explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4cpA

Settings
# exclusive inclusive rows x rows loops node
1. 379.431 1,495.026 ↓ 1.1 337,417 1

WindowAgg (cost=87,265.46..93,969.87 rows=297,974 width=28) (actual time=960.307..1,495.026 rows=337,417 loops=1)

2. 440.355 1,115.595 ↓ 1.1 337,417 1

Sort (cost=87,265.46..88,010.39 rows=297,974 width=20) (actual time=960.298..1,115.595 rows=337,417 loops=1)

  • Sort Key: li.lease_id, li.lease_start_date DESC, li.id DESC
  • Sort Method: quicksort Memory: 37,113kB
3. 284.002 675.240 ↓ 1.1 337,417 1

Hash Join (cost=11.95..60,172.43 rows=297,974 width=20) (actual time=0.238..675.240 rows=337,417 loops=1)

  • Hash Cond: (li.property_id = load_prop.property_id)
4. 391.015 391.015 ↓ 1.1 338,827 1

Seq Scan on lease_intervals li (cost=0.00..56,063.34 rows=297,974 width=24) (actual time=0.008..391.015 rows=338,827 loops=1)

  • Filter: ((lease_status_type_id <> 2) AND (lease_interval_type_id <> 4) AND (lease_start_date < '2020-09-30'::date) AND (lease_end_date < '2020-09-30'::date) AND (cid = 13,531))
  • Rows Removed by Filter: 1,109,588
5. 0.102 0.223 ↑ 1.0 220 1

Hash (cost=9.20..9.20 rows=220 width=4) (actual time=0.223..0.223 rows=220 loops=1)

  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
6. 0.121 0.121 ↑ 1.0 220 1

Seq Scan on load_prop (cost=0.00..9.20 rows=220 width=4) (actual time=0.003..0.121 rows=220 loops=1)

Planning time : 0.385 ms