explain.depesz.com

PostgreSQL's explain analyze made readable

Result: DFZP

Settings
# exclusive inclusive rows x rows loops node
1. 135.389 4,300.016 ↓ 61,437.0 61,437 1

GroupAggregate (cost=657,469.21..657,469.24 rows=1 width=44) (actual time=4,094.891..4,300.016 rows=61,437 loops=1)

  • Group Key: scl.cid, scl.lease_id, scl.lease_interval_id
2. 198.655 4,164.627 ↓ 165,002.0 165,002 1

Sort (cost=657,469.21..657,469.22 rows=1 width=16) (actual time=4,094.876..4,164.627 rows=165,002 loops=1)

  • Sort Key: scl.lease_id, scl.lease_interval_id
  • Sort Method: quicksort Memory: 19,035kB
3. 254.842 3,965.972 ↓ 165,002.0 165,002 1

Nested Loop (cost=53,586.71..657,469.20 rows=1 width=16) (actual time=704.532..3,965.972 rows=165,002 loops=1)

4. 356.963 3,546.128 ↓ 165,002.0 165,002 1

Nested Loop (cost=53,586.56..657,469.04 rows=1 width=20) (actual time=704.521..3,546.128 rows=165,002 loops=1)

5. 0.000 3,024.163 ↓ 165,002.0 165,002 1

Gather (cost=53,586.42..657,468.86 rows=1 width=24) (actual time=704.506..3,024.163 rows=165,002 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
6. 107.404 3,098.070 ↓ 55,001.0 55,001 3 / 3

Hash Join (cost=52,586.42..656,468.76 rows=1 width=24) (actual time=716.323..3,098.070 rows=55,001 loops=3)

  • Hash Cond: ((scl.lease_id = li.lease_id) AND (scl.lease_interval_id = li.id))
7. 2,282.936 2,282.936 ↑ 1.5 79,298 3 / 3

Parallel Seq Scan on scheduled_charge_logs scl (cost=0.00..603,255.27 rows=119,443 width=24) (actual time=0.129..2,282.936 rows=79,298 loops=3)

  • Filter: ((NOT is_post_date_ignored) AND (NOT is_deleted) AND (NOT is_unselected_quote) AND (charge_start_date <= '2020-09-30'::date) AND ((charge_end_date IS NULL) OR (charge_end_date >= '2020-09-01'::date)) AND (cid = 13,531) AND (LEAST(charge_end_date, '2020-09-30'::date) >= reporting_post_date) AND (LEAST(charge_end_date, '2020-09-30'::date) <= apply_through_post_date) AND (ar_trigger_id = ANY ('{301,302,303,304,305,306,307,308,309,310}'::integer[])))
  • Rows Removed by Filter: 3,971,225
8. 290.824 707.730 ↑ 1.2 427,675 3 / 3

Hash (cost=45,200.22..45,200.22 rows=492,413 width=12) (actual time=707.729..707.730 rows=427,675 loops=3)

  • Buckets: 524,288 Batches: 1 Memory Usage: 22,473kB
9. 416.906 416.906 ↓ 1.0 495,601 3 / 3

Seq Scan on lease_intervals li (cost=0.00..45,200.22 rows=492,413 width=12) (actual time=0.020..416.906 rows=495,601 loops=3)

  • Filter: ((lease_status_type_id <> 2) AND (cid = 13,531))
  • Rows Removed by Filter: 952,814
10. 165.002 165.002 ↑ 1.0 1 165,002

Index Only Scan using idx_load_prop_property_id on load_prop (cost=0.14..0.16 rows=1 width=4) (actual time=0.001..0.001 rows=1 loops=165,002)

  • Index Cond: (property_id = scl.property_id)
  • Heap Fetches: 165,002
11. 165.002 165.002 ↑ 1.0 1 165,002

Index Scan using idx_ar_codes on ar_codes ac (cost=0.14..0.17 rows=1 width=8) (actual time=0.001..0.001 rows=1 loops=165,002)

  • Index Cond: (id = scl.ar_code_id)
  • Filter: (cid = 13,531)
Planning time : 1.819 ms