explain.depesz.com

PostgreSQL's explain analyze made readable

Result: HT4A

Settings
# exclusive inclusive rows x rows loops node
1. 218.379 1,722.365 ↓ 153.8 229,233 1

Subquery Scan on lease_interval (cost=87,265.46..97,694.55 rows=1,490 width=24) (actual time=964.395..1,722.365 rows=229,233 loops=1)

  • Filter: (lease_interval.row_number = 1)
  • Rows Removed by Filter: 108,184
2. 381.477 1,503.986 ↓ 1.1 337,417 1

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

3. 444.709 1,122.509 ↓ 1.1 337,417 1

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

  • Sort Key: li.lease_id, li.lease_start_date DESC, li.id DESC
  • Sort Method: quicksort Memory: 37,113kB
4. 285.475 677.800 ↓ 1.1 337,417 1

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

  • Hash Cond: (li.property_id = load_prop.property_id)
5. 392.111 392.111 ↓ 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..392.111 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
6. 0.102 0.214 ↑ 1.0 220 1

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

  • Buckets: 1,024 Batches: 1 Memory Usage: 16kB
7. 0.112 0.112 ↑ 1.0 220 1

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

Planning time : 0.423 ms