explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ReK0

Settings
# exclusive inclusive rows x rows loops node
1. 136.700 596.175 ↓ 933.1 46,656 1

Nested Loop Left Join (cost=15.98..2,895.63 rows=50 width=68) (actual time=0.304..596.175 rows=46,656 loops=1)

2. 11.258 412.819 ↓ 933.1 46,656 1

Nested Loop (cost=15.71..2,867.03 rows=50 width=74) (actual time=0.252..412.819 rows=46,656 loops=1)

3. 12.785 308.249 ↓ 933.1 46,656 1

Hash Join (cost=15.42..2,847.01 rows=50 width=78) (actual time=0.239..308.249 rows=46,656 loops=1)

  • Hash Cond: (us.property_id = load_prop.property_id)
4. 0.176 295.375 ↓ 937.4 46,872 1

Nested Loop (cost=4.98..2,834.89 rows=50 width=82) (actual time=0.143..295.375 rows=46,872 loops=1)

5. 16.225 123.939 ↓ 215.2 42,815 1

Nested Loop (cost=4.56..2,697.64 rows=199 width=66) (actual time=0.058..123.939 rows=42,815 loops=1)

6. 6.098 21.893 ↓ 200.0 28,607 1

Hash Left Join (cost=4.27..2,601.20 rows=143 width=16) (actual time=0.038..21.893 rows=28,607 loops=1)

  • Hash Cond: ((us.cid = usu.cid) AND (us.id = usu.unit_space_id))
  • Filter: (CASE WHEN (us.id <> usu.group_unit_space_id) THEN us.id ELSE NULL::integer END IS NULL)
7. 15.786 15.786 ↑ 1.0 28,607 1

Seq Scan on unit_spaces us (cost=0.00..2,382.35 rows=28,607 width=16) (actual time=0.017..15.786 rows=28,607 loops=1)

  • Filter: ((deleted_on IS NULL) AND (cid = 15077))
  • Rows Removed by Filter: 50
8. 0.001 0.009 ↓ 0.0 0 1

Hash (cost=4.23..4.23 rows=1 width=12) (actual time=0.009..0.009 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 8kB
9. 0.008 0.008 ↓ 0.0 0 1

Index Scan using uk_unit_space_unions on unit_space_unions usu (cost=0.15..4.23 rows=1 width=12) (actual time=0.008..0.008 rows=0 loops=1)

  • Index Cond: ((cid = 15077) AND (lease_term_id = 100))
10. 85.821 85.821 ↑ 2.0 1 28,607

Index Scan using idx_cached_leases_unit_space_id on cached_leases cl_prior (cost=0.29..0.61 rows=2 width=54) (actual time=0.002..0.003 rows=1 loops=28,607)

  • Index Cond: (unit_space_id = us.id)
  • Filter: ((occupancy_type_id <> 5) AND (lease_status_type_id <> 2) AND (cid = 15077))
  • Rows Removed by Filter: 0
11. 171.260 171.260 ↑ 1.0 1 42,815

Index Scan using idx_lease_intervals_major_composite on lease_intervals li_inner (cost=0.42..0.66 rows=1 width=24) (actual time=0.003..0.004 rows=1 loops=42,815)

  • Index Cond: ((cid = 15077) AND (lease_id = cl_prior.id))
  • Filter: ((lease_status_type_id <> ALL ('{2,1}'::integer[])) AND (lease_interval_type_id <> ALL ('{4,2}'::integer[])))
  • Rows Removed by Filter: 1
12. 0.041 0.089 ↑ 1.0 135 1

Hash (cost=6.05..6.05 rows=135 width=4) (actual time=0.089..0.089 rows=135 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
13. 0.048 0.048 ↑ 1.0 135 1

Seq Scan on load_prop (cost=0.00..6.05 rows=135 width=4) (actual time=0.011..0.048 rows=135 loops=1)

14. 93.312 93.312 ↑ 1.0 1 46,656

Index Scan using pk_property_units on property_units pu (cost=0.29..0.40 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=46,656)

  • Index Cond: ((cid = 15077) AND (id = us.property_unit_id))
  • Filter: (deleted_on IS NULL)
15. 46.656 46.656 ↑ 1.0 1 46,656

Index Scan using pk_lease_terms on lease_terms lt_inner (cost=0.28..0.32 rows=1 width=12) (actual time=0.001..0.001 rows=1 loops=46,656)

  • Index Cond: ((cid = li_inner.cid) AND (cid = 15077) AND (id = li_inner.lease_term_id))
Planning time : 6.880 ms