explain.depesz.com

PostgreSQL's explain analyze made readable

Result: r7jM

Settings
# exclusive inclusive rows x rows loops node
1. 0.541 123.012 ↓ 452.0 452 1

WindowAgg (cost=3,704.28..3,704.31 rows=1 width=28) (actual time=122.293..123.012 rows=452 loops=1)

2. 0.514 122.471 ↓ 452.0 452 1

Sort (cost=3,704.28..3,704.29 rows=1 width=20) (actual time=122.286..122.471 rows=452 loops=1)

  • Sort Key: li.lease_id, li.lease_start_date DESC, li.id DESC
  • Sort Method: quicksort Memory: 60kB
3. 39.938 121.957 ↓ 452.0 452 1

Nested Loop (cost=0.43..3,704.27 rows=1 width=20) (actual time=10.885..121.957 rows=452 loops=1)

  • Join Filter: (li.property_id = load_prop.property_id)
  • Rows Removed by Join Filter: 98,988
4. 10.063 41.791 ↓ 452.0 452 1

Nested Loop (cost=0.43..3,692.32 rows=1 width=24) (actual time=10.746..41.791 rows=452 loops=1)

5. 14.080 14.080 ↓ 183.8 8,824 1

Seq Scan on temp_lease_activity tla (cost=0.00..3,285.76 rows=48 width=12) (actual time=0.015..14.080 rows=8,824 loops=1)

  • Filter: (cid = 13,531)
6. 17.648 17.648 ↓ 0.0 0 8,824

Index Scan using idx_lease_intervals on lease_intervals li (cost=0.43..8.46 rows=1 width=24) (actual time=0.002..0.002 rows=0 loops=8,824)

  • Index Cond: (id = tla.lease_interval_id)
  • 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) AND (tla.lease_id = lease_id))
  • Rows Removed by Filter: 1
7. 40.228 40.228 ↑ 1.0 220 452

Seq Scan on load_prop (cost=0.00..9.20 rows=220 width=4) (actual time=0.001..0.089 rows=220 loops=452)

Planning time : 0.665 ms