explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MG0f : Optimization for: plan #jgjA

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=26.52..27.05 rows=1 width=164) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Result (cost=26.52..27.05 rows=1 width=164) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Sort (cost=26.52..26.53 rows=1 width=150) (actual rows= loops=)

  • Sort Key: ssc.viewed_on DESC, ssc.id DESC, lap.property_name
4. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=14.50..26.51 rows=1 width=150) (actual rows= loops=)

  • Join Filter: (c.cid = ssca.cid)
5. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=14.07..25.25 rows=1 width=134) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

Nested Loop Left Join (cost=13.65..22.82 rows=1 width=129) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13.22..20.39 rows=1 width=129) (actual rows= loops=)

8. 0.000 0.000 ↓ 0.0

Nested Loop (cost=13.09..20.20 rows=1 width=120) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Nested Loop (cost=12.96..20.01 rows=1 width=104) (actual rows= loops=)

  • Join Filter: (lap.property_id = ssc.property_id)
10. 0.000 0.000 ↓ 0.0

Hash Join (cost=12.81..18.97 rows=3 width=68) (actual rows= loops=)

  • Hash Cond: (ssca.property_id = lap.property_id)
11. 0.000 0.000 ↓ 0.0

Seq Scan on subsidy_special_claim_associations ssca (cost=0.00..5.65 rows=127 width=28) (actual rows= loops=)

  • Filter: (cid = 235)
12. 0.000 0.000 ↓ 0.0

Hash (cost=12.75..12.75 rows=5 width=40) (actual rows= loops=)

13. 0.000 0.000 ↓ 0.0

Function Scan on load_affordable_properties lap (cost=0.25..12.75 rows=5 width=40) (actual rows= loops=)

  • Filter: (cid = 235)
14. 0.000 0.000 ↓ 0.0

Index Scan using pk_subsidy_special_claims on subsidy_special_claims ssc (cost=0.14..0.34 rows=1 width=60) (actual rows= loops=)

  • Index Cond: ((cid = 235) AND (id = ssca.subsidy_special_claim_id))
  • Filter: ((subsidy_special_claim_status_type_id <> 2) AND (ssca.property_id = property_id))
15. 0.000 0.000 ↓ 0.0

Index Scan using pk_subsidy_special_claim_types on subsidy_special_claim_types ssst (cost=0.13..0.17 rows=1 width=20) (actual rows= loops=)

  • Index Cond: (id = ssc.subsidy_special_claim_type_id)
16. 0.000 0.000 ↓ 0.0

Index Scan using pk_subsidy_special_claim_status_types on subsidy_special_claim_status_types sscst (cost=0.13..0.17 rows=1 width=13) (actual rows= loops=)

  • Index Cond: (id = ssc.subsidy_special_claim_status_type_id)
17. 0.000 0.000 ↓ 0.0

Index Scan using pk_cached_leases on cached_leases cl (cost=0.43..2.43 rows=1 width=12) (actual rows= loops=)

  • Index Cond: ((cid = ssca.cid) AND (cid = 235) AND (id = ssca.lease_id))
18. 0.000 0.000 ↓ 0.0

Index Scan using idx_unit_spaces on unit_spaces us (cost=0.42..2.42 rows=1 width=13) (actual rows= loops=)

  • Index Cond: (ssca.unit_space_id = id)
  • Filter: ((cid = 235) AND (ssca.cid = cid))
19. 0.000 0.000 ↓ 0.0

Index Scan using idx_customers_id on customers c (cost=0.43..1.25 rows=1 width=26) (actual rows= loops=)

  • Index Cond: (id = cl.primary_customer_id)