explain.depesz.com

PostgreSQL's explain analyze made readable

Result: b6g3

Settings
# exclusive inclusive rows x rows loops node
1. 289.263 13,309.417 ↑ 1.9 84,745 1

Hash Left Join (cost=41,861.35..722,809.83 rows=157,945 width=8,059) (actual time=5,690.804..13,309.417 rows=84,745 loops=1)

  • Hash Cond: ((cll.cid = cd.cid) AND (cll.primary_customer_id = cd.customer_id))
2. 337.073 12,246.199 ↑ 1.9 84,745 1

Nested Loop Left Join (cost=15,807.34..693,991.78 rows=157,945 width=7,840) (actual time=4,915.455..12,246.199 rows=84,745 loops=1)

3. 206.167 11,485.401 ↑ 1.9 84,745 1

Hash Left Join (cost=15,806.91..617,119.03 rows=157,945 width=2,264) (actual time=4,915.400..11,485.401 rows=84,745 loops=1)

  • Hash Cond: ((li.cid = lt.cid) AND (li.lease_term_id = lt.id))
4. 211.637 11,278.910 ↑ 1.7 84,745 1

Hash Left Join (cost=15,787.02..616,327.96 rows=145,705 width=2,045) (actual time=4,915.062..11,278.910 rows=84,745 loops=1)

  • Hash Cond: ((li.cid = lsw.cid) AND (li.lease_start_window_id = lsw.id))
5. 93.460 11,065.456 ↑ 1.7 84,745 1

Hash Join (cost=15,699.18..615,474.70 rows=145,705 width=1,930) (actual time=4,913.225..11,065.456 rows=84,745 loops=1)

  • Hash Cond: (clp.property_id = load_prop.property_id)
6. 0.000 10,971.810 ↑ 1.7 84,745 1

Gather (cost=15,690.91..613,462.98 rows=145,705 width=1,822) (actual time=4,913.025..10,971.810 rows=84,745 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
7. 83.567 12,153.315 ↑ 2.1 28,248 3 / 3

Hash Join (cost=14,690.91..597,892.48 rows=60,710 width=1,822) (actual time=5,995.963..12,153.315 rows=28,248 loops=3)

  • Hash Cond: (clp.lease_id = lus.lease_id)
8. 92.570 11,559.360 ↑ 2.1 28,120 3 / 3

Nested Loop Left Join (cost=2.08..580,330.43 rows=60,430 width=1,758) (actual time=5,483.844..11,559.360 rows=28,120 loops=3)

9. 59.326 11,326.190 ↑ 2.1 28,120 3 / 3

Hash Left Join (cost=1.66..551,090.33 rows=60,430 width=1,642) (actual time=5,483.805..11,326.190 rows=28,120 loops=3)

  • Hash Cond: (cll.occupancy_type_id = ot_lease.id)
10. 129.796 11,266.829 ↑ 2.1 28,120 3 / 3

Nested Loop Left Join (cost=0.43..550,863.25 rows=60,430 width=908) (actual time=5,483.650..11,266.829 rows=28,120 loops=3)

11. 10,630.873 10,630.873 ↑ 2.1 28,120 3 / 3

Parallel Seq Scan on cached_lease_periods clp (cost=0.00..333,762.60 rows=60,430 width=545) (actual time=5,483.145..10,630.873 rows=28,120 loops=3)

  • Filter: ((cid = 13531) AND (post_month = '2020-05-01'::date) AND (lease_status_type_id = ANY ('{3,4,5}'::integer[])))
  • Rows Removed by Filter: 1290400
12. 506.160 506.160 ↑ 1.0 1 84,360 / 3

Index Scan using pk_cached_lease_logs on cached_lease_logs cll (cost=0.43..3.59 rows=1 width=363) (actual time=0.018..0.018 rows=1 loops=84,360)

  • Index Cond: ((cid = clp.cid) AND (cid = 13531) AND (id = clp.cached_lease_log_id))
13. 0.017 0.035 ↑ 1.0 10 3 / 3

Hash (cost=1.10..1.10 rows=10 width=734) (actual time=0.034..0.035 rows=10 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 16kB
14. 0.018 0.018 ↑ 1.0 10 3 / 3

Seq Scan on occupancy_types ot_lease (cost=0.00..1.10 rows=10 width=734) (actual time=0.013..0.018 rows=10 loops=3)

15. 140.600 140.600 ↑ 1.0 1 84,360 / 3

Index Scan using idx_lease_intervals on lease_intervals li (cost=0.43..0.47 rows=1 width=116) (actual time=0.005..0.005 rows=1 loops=84,360)

  • Index Cond: (id = cll.active_lease_interval_id)
  • Filter: ((cid = 13531) AND (cid = cll.cid) AND (lease_id = cll.lease_id))
16. 258.807 510.388 ↓ 1.0 420,946 3 / 3

Hash (cost=9,431.30..9,431.30 rows=420,602 width=64) (actual time=510.387..510.388 rows=420,946 loops=3)

  • Buckets: 524288 Batches: 1 Memory Usage: 38769kB
17. 251.581 251.581 ↓ 1.0 420,946 3 / 3

Seq Scan on lease_unit_spaces lus (cost=0.00..9,431.30 rows=420,602 width=64) (actual time=0.016..251.581 rows=420,946 loops=3)

  • Filter: ((deleted_on IS NULL) AND (deleted_by IS NULL) AND (cid = 13531))
  • Rows Removed by Filter: 358
18. 0.095 0.186 ↑ 1.0 190 1

Hash (cost=5.90..5.90 rows=190 width=108) (actual time=0.185..0.186 rows=190 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 35kB
19. 0.091 0.091 ↑ 1.0 190 1

Seq Scan on load_prop (cost=0.00..5.90 rows=190 width=108) (actual time=0.010..0.091 rows=190 loops=1)

20. 0.885 1.817 ↑ 1.0 1,799 1

Hash (cost=60.85..60.85 rows=1,799 width=115) (actual time=1.816..1.817 rows=1,799 loops=1)

  • Buckets: 2048 Batches: 1 Memory Usage: 252kB
21. 0.932 0.932 ↑ 1.0 1,799 1

Seq Scan on lease_start_windows lsw (cost=0.00..60.85 rows=1,799 width=115) (actual time=0.009..0.932 rows=1,799 loops=1)

  • Filter: (cid = 13531)
  • Rows Removed by Filter: 269
22. 0.152 0.324 ↑ 1.0 311 1

Hash (cost=15.23..15.23 rows=311 width=219) (actual time=0.323..0.324 rows=311 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 60kB
23. 0.172 0.172 ↑ 1.0 311 1

Seq Scan on lease_terms lt (cost=0.00..15.23 rows=311 width=219) (actual time=0.006..0.172 rows=311 loops=1)

  • Filter: (cid = 13531)
  • Rows Removed by Filter: 107
24. 423.725 423.725 ↑ 1.0 1 84,745

Index Scan using idx_customers_id on customers c (cost=0.42..0.48 rows=1 width=5,576) (actual time=0.005..0.005 rows=1 loops=84,745)

  • Index Cond: (id = cll.primary_customer_id)
  • Filter: ((cid = 13531) AND (cid = cll.cid))
25. 423.469 773.955 ↑ 1.0 686,255 1

Hash (cost=15,760.19..15,760.19 rows=686,255 width=219) (actual time=773.955..773.955 rows=686,255 loops=1)

  • Buckets: 1048576 Batches: 1 Memory Usage: 65203kB
26. 350.486 350.486 ↑ 1.0 686,255 1

Seq Scan on customer_details cd (cost=0.00..15,760.19 rows=686,255 width=219) (actual time=0.009..350.486 rows=686,255 loops=1)

  • Filter: (cid = 13531)