explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 2YH1

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

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

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

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

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

Nested Loop (cost=53,586.71..657,469.20 rows=1 width=16) (actual time=714.524..4,028.207 rows=165,002 loops=1)

4. 360.540 3,603.662 ↓ 165,002.0 165,002 1

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

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

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

  • Workers Planned: 2
  • Workers Launched: 2
6. 109.508 3,155.830 ↓ 55,001.0 55,001 3 / 3

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

  • Hash Cond: ((scl.lease_id = li.lease_id) AND (scl.lease_interval_id = li.id))
7. 2,323.888 2,323.888 ↑ 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.130..2,323.888 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. 296.056 722.434 ↑ 1.2 427,675 3 / 3

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

  • Buckets: 524,288 Batches: 1 Memory Usage: 22,473kB
9. 426.378 426.378 ↓ 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.019..426.378 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.902 ms