explain.depesz.com

PostgreSQL's explain analyze made readable

Result: MdTW : Optimization for: Optimization for: plan #jgjA; plan #MG0f

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.002 0.185 ↓ 0.0 0 1

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

2. 0.001 0.183 ↓ 0.0 0 1

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

3. 0.077 0.182 ↓ 0.0 0 1

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

  • Sort Key: ssc.viewed_on DESC, ssc.id DESC, lap.property_name
  • Sort Method: quicksort Memory: 25kB
4. 0.001 0.105 ↓ 0.0 0 1

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

  • Join Filter: (c.cid = ssca.cid)
5. 0.001 0.104 ↓ 0.0 0 1

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

6. 0.000 0.103 ↓ 0.0 0 1

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

7. 0.000 0.103 ↓ 0.0 0 1

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

8. 0.001 0.103 ↓ 0.0 0 1

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

9. 0.000 0.102 ↓ 0.0 0 1

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

  • Join Filter: (lap.property_id = ssc.property_id)
10. 0.001 0.102 ↓ 0.0 0 1

Hash Join (cost=12.81..18.97 rows=3 width=68) (actual time=0.102..0.102 rows=0 loops=1)

  • Hash Cond: (ssca.property_id = lap.property_id)
11. 0.101 0.101 ↓ 0.0 0 1

Seq Scan on subsidy_special_claim_associations ssca (cost=0.00..5.65 rows=127 width=28) (actual time=0.100..0.101 rows=0 loops=1)

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

Hash (cost=12.75..12.75 rows=5 width=40) (never executed)

13. 0.000 0.000 ↓ 0.0 0

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

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

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

  • 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 0

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

  • Index Cond: (id = ssc.subsidy_special_claim_type_id)
16. 0.000 0.000 ↓ 0.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) (never executed)

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

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

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

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

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

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

  • Index Cond: (id = cl.primary_customer_id)
  • Filter: (cid = 235)
Planning time : 29.727 ms