explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cG9D

Settings
# exclusive inclusive rows x rows loops node
1. 745.613 1,643.612 ↓ 25,485.0 25,485 1

GroupAggregate (cost=119,113.81..119,114.11 rows=1 width=40) (actual time=883.927..1,643.612 rows=25,485 loops=1)

  • Group Key: sc.lease_id, sc.lease_interval_id
2. 69.189 897.999 ↓ 65,255.0 65,255 1

Sort (cost=119,113.81..119,113.82 rows=1 width=24) (actual time=883.792..897.999 rows=65,255 loops=1)

  • Sort Key: sc.lease_id, sc.lease_interval_id
  • Sort Method: quicksort Memory: 6635kB
3. 49.456 828.810 ↓ 65,255.0 65,255 1

Nested Loop (cost=5,832.75..119,113.80 rows=1 width=24) (actual time=39.783..828.810 rows=65,255 loops=1)

4. 43.549 453.079 ↓ 34.0 65,255 1

Hash Join (cost=5,832.32..112,936.96 rows=1,920 width=24) (actual time=39.753..453.079 rows=65,255 loops=1)

  • Hash Cond: (sc.property_id = load_prop.property_id)
5. 380.242 409.497 ↓ 2.5 65,255 1

Bitmap Heap Scan on scheduled_charges sc (cost=5,830.81..112,817.01 rows=26,464 width=28) (actual time=39.710..409.497 rows=65,255 loops=1)

  • Recheck Cond: (cid = 8132)
  • Filter: ((deleted_by IS NULL) AND (deleted_on IS NULL) AND (NOT is_unselected_quote) AND (ar_trigger_id = ANY ('{301,302,303,304,305,306,307,308,309,310}'::integer[])))
  • Rows Removed by Filter: 242130
  • Heap Blocks: exact=52479
6. 29.255 29.255 ↑ 1.0 307,424 1

Bitmap Index Scan on pk_scheduled_charges (cost=0.00..5,824.19 rows=315,168 width=0) (actual time=29.254..29.255 rows=307,424 loops=1)

  • Index Cond: (cid = 8132)
7. 0.010 0.033 ↑ 1.0 23 1

Hash (cost=1.23..1.23 rows=23 width=4) (actual time=0.033..0.033 rows=23 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
8. 0.023 0.023 ↑ 1.0 23 1

Seq Scan on load_prop (cost=0.00..1.23 rows=23 width=4) (actual time=0.018..0.023 rows=23 loops=1)

9. 326.275 326.275 ↑ 1.0 1 65,255

Index Scan using idx_lease_intervals on lease_intervals li (cost=0.43..3.21 rows=1 width=16) (actual time=0.005..0.005 rows=1 loops=65,255)

  • Index Cond: (id = sc.lease_interval_id)
  • Filter: ((cid = 8132) AND (sc.lease_id = lease_id))
  • Rows Removed by Filter: 0
Planning time : 1.440 ms