explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9lOa

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 146.072 ↓ 5.0 5 1

WindowAgg (cost=4,925.38..4,925.41 rows=1 width=28) (actual time=146.068..146.072 rows=5 loops=1)

2. 0.021 146.056 ↓ 5.0 5 1

Sort (cost=4,925.38..4,925.39 rows=1 width=16) (actual time=146.055..146.056 rows=5 loops=1)

  • Sort Key: e.lease_id, e.event_datetime DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.067 146.035 ↓ 5.0 5 1

Nested Loop (cost=0.56..4,925.37 rows=1 width=16) (actual time=41.484..146.035 rows=5 loops=1)

4. 0.033 0.033 ↑ 1.0 23 1

Seq Scan on load_prop (cost=0.00..4.23 rows=23 width=4) (actual time=0.003..0.033 rows=23 loops=1)

5. 145.935 145.935 ↓ 0.0 0 23

Index Scan using idx_events_cid_etid_pid_event_datetime on events e (cost=0.56..213.95 rows=1 width=20) (actual time=6.319..6.345 rows=0 loops=23)

  • Index Cond: ((cid = 8,132) AND (event_type_id = 21) AND (property_id = load_prop.property_id))
  • Filter: ((lease_id IS NOT NULL) AND (old_status_id = ANY ('{6,5}'::integer[])) AND (new_status_id = 4) AND ((created_on)::date >= '2020-09-01'::date) AND ((created_on)::date <= '2020-09-30'::date))
  • Rows Removed by Filter: 1,751
Planning time : 0.561 ms