explain.depesz.com

PostgreSQL's explain analyze made readable

Result: P5ad

Settings
# exclusive inclusive rows x rows loops node
1. 3.586 46.042 ↓ 3.0 996 1

Nested Loop Left Join (cost=2,521.63..7,146.93 rows=334 width=10,551) (actual time=13.550..46.042 rows=996 loops=1)

2. 3.486 41.460 ↓ 3.0 996 1

Nested Loop Left Join (cost=2,521.35..7,043.39 rows=334 width=7,339) (actual time=13.533..41.460 rows=996 loops=1)

3. 2.887 36.978 ↓ 3.0 996 1

Nested Loop Left Join (cost=2,521.08..6,938.67 rows=334 width=3,755) (actual time=13.515..36.978 rows=996 loops=1)

4. 2.082 31.103 ↓ 3.0 996 1

Hash Left Join (cost=2,520.79..6,810.85 rows=334 width=2,473) (actual time=12.569..31.103 rows=996 loops=1)

  • Hash Cond: (usl.property_unit_id = property_unit_details.property_unit_id)
5. 2.087 27.944 ↓ 3.0 996 1

Hash Left Join (cost=2,484.89..6,773.50 rows=334 width=2,457) (actual time=11.480..27.944 rows=996 loops=1)

  • Hash Cond: (usl.unit_space_status_type_id = usst.id)
6. 2.105 25.843 ↓ 3.0 996 1

Hash Left Join (cost=2,483.73..6,770.93 rows=334 width=1,916) (actual time=11.455..25.843 rows=996 loops=1)

  • Hash Cond: ((usl.cid = use.cid) AND (usl.property_id = use.property_id) AND (usl.unit_exclusion_reason_type_id = use.unit_exclusion_reason_type_id))
7. 2.117 23.673 ↓ 3.0 996 1

Hash Left Join (cost=2,480.99..6,765.56 rows=334 width=1,688) (actual time=11.377..23.673 rows=996 loops=1)

  • Hash Cond: (usl.unit_exclusion_reason_type_id = usert.id)
8. 2.522 21.536 ↓ 3.0 996 1

Nested Loop Left Join (cost=2,479.81..6,763.03 rows=334 width=1,237) (actual time=11.339..21.536 rows=996 loops=1)

9. 1.650 16.026 ↓ 3.0 996 1

Nested Loop (cost=2,479.38..5,096.71 rows=334 width=689) (actual time=11.315..16.026 rows=996 loops=1)

10. 0.010 0.010 ↑ 1.0 1 1

Seq Scan on load_prop (cost=0.00..1.01 rows=1 width=94) (actual time=0.007..0.010 rows=1 loops=1)

11. 3.161 14.366 ↓ 3.0 996 1

Bitmap Heap Scan on cached_unit_space_periods cusp (cost=2,479.38..5,092.36 rows=334 width=595) (actual time=11.300..14.366 rows=996 loops=1)

  • Recheck Cond: ((property_id = load_prop.property_id) AND (post_month = '2020-05-01'::date))
  • Filter: ((NOT COALESCE(is_deleted, false)) AND (cid = 13531))
  • Heap Blocks: exact=570
12. 0.401 11.205 ↓ 0.0 0 1

BitmapAnd (cost=2,479.38..2,479.38 rows=668 width=0) (actual time=11.204..11.205 rows=0 loops=1)

13. 3.098 3.098 ↑ 1.2 46,459 1

Bitmap Index Scan on idx_cached_unit_space_periods_property_id (cost=0.00..1,048.95 rows=56,602 width=0) (actual time=3.098..3.098 rows=46,459 loops=1)

  • Index Cond: (property_id = load_prop.property_id)
14. 7.706 7.706 ↓ 1.3 99,470 1

Bitmap Index Scan on idx_cached_unit_space_periods_post_month (cost=0.00..1,420.50 rows=76,809 width=0) (actual time=7.706..7.706 rows=99,470 loops=1)

  • Index Cond: (post_month = '2020-05-01'::date)
15. 2.988 2.988 ↑ 1.0 1 996

Index Scan using idx_unit_space_logs_id on unit_space_logs usl (cost=0.43..4.98 rows=1 width=548) (actual time=0.003..0.003 rows=1 loops=996)

  • Index Cond: (id = cusp.unit_space_log_id)
  • Filter: ((cid = 13531) AND (cid = cusp.cid))
16. 0.009 0.020 ↑ 1.0 8 1

Hash (cost=1.08..1.08 rows=8 width=451) (actual time=0.019..0.020 rows=8 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
17. 0.011 0.011 ↑ 1.0 8 1

Seq Scan on unit_exclusion_reason_types usert (cost=0.00..1.08 rows=8 width=451) (actual time=0.007..0.011 rows=8 loops=1)

18. 0.034 0.065 ↑ 1.0 58 1

Hash (cost=1.73..1.73 rows=58 width=228) (actual time=0.065..0.065 rows=58 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
19. 0.031 0.031 ↑ 1.0 58 1

Seq Scan on unit_space_exclusions use (cost=0.00..1.73 rows=58 width=228) (actual time=0.006..0.031 rows=58 loops=1)

  • Filter: (cid = 13531)
20. 0.006 0.014 ↑ 1.0 7 1

Hash (cost=1.07..1.07 rows=7 width=541) (actual time=0.014..0.014 rows=7 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
21. 0.008 0.008 ↑ 1.0 7 1

Seq Scan on unit_space_status_types usst (cost=0.00..1.07 rows=7 width=541) (actual time=0.004..0.008 rows=7 loops=1)

22. 0.522 1.077 ↑ 1.0 1,156 1

Hash (cost=21.45..21.45 rows=1,156 width=16) (actual time=1.077..1.077 rows=1,156 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 71kB
23. 0.555 0.555 ↑ 1.0 1,156 1

Seq Scan on property_unit_details (cost=0.00..21.45 rows=1,156 width=16) (actual time=0.017..0.555 rows=1,156 loops=1)

  • Filter: (cid = 13531)
24. 2.988 2.988 ↑ 1.0 1 996

Index Scan using pk_property_units on property_units pu (cost=0.29..0.38 rows=1 width=1,282) (actual time=0.003..0.003 rows=1 loops=996)

  • Index Cond: ((cusp.cid = cid) AND (cid = 13531) AND (cusp.property_unit_id = id))
25. 0.996 0.996 ↑ 1.0 1 996

Index Scan using idx_property_floorplans on property_floorplans pf (cost=0.28..0.30 rows=1 width=3,584) (actual time=0.001..0.001 rows=1 loops=996)

  • Index Cond: (id = cusp.property_floorplan_id)
  • Filter: ((cid = 13531) AND (cid = cusp.cid))
26. 0.996 0.996 ↑ 1.0 1 996

Index Scan using idx_unit_types_id on unit_types ut (cost=0.28..0.30 rows=1 width=3,208) (actual time=0.001..0.001 rows=1 loops=996)

  • Index Cond: (id = cusp.unit_type_id)
  • Filter: ((cid = 13531) AND (cid = cusp.cid))