explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oySW : Optimization for: Optimization for: plan #ACWQ; plan #ABXd

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 59.754 372.695 ↓ 23.7 62,581 1

WindowAgg (cost=8,152.34..8,211.88 rows=2,646 width=323) (actual time=296.699..372.695 rows=62,581 loops=1)

2. 154.720 312.941 ↓ 23.7 62,581 1

Sort (cost=8,152.34..8,158.96 rows=2,646 width=315) (actual time=296.573..312.941 rows=62,581 loops=1)

  • Sort Key: e.lease_interval_id, ((e.company_employee_id IS NOT NULL)), e.event_datetime
  • Sort Method: quicksort Memory: 37507kB
3. 23.035 158.221 ↓ 23.7 62,581 1

Nested Loop (cost=0.43..8,001.92 rows=2,646 width=315) (actual time=0.036..158.221 rows=62,581 loops=1)

4. 0.040 0.040 ↑ 1.0 22 1

Seq Scan on load_prop (cost=0.00..1.22 rows=22 width=4) (actual time=0.006..0.040 rows=22 loops=1)

5. 135.146 135.146 ↓ 23.7 2,845 22

Index Scan using idx_events_s1314 on events e (cost=0.43..362.47 rows=120 width=322) (actual time=0.011..6.143 rows=2,845 loops=22)

  • Index Cond: ((cid = 16033) AND (property_id = load_prop.property_id))
  • Filter: ((NOT is_deleted) AND (ps_product_id IS DISTINCT FROM 28))
  • Rows Removed by Filter: 460