explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iNgp

Settings
# exclusive inclusive rows x rows loops node
1. 76.566 44,146.653 ↓ 34,563.0 69,126 1

Group (cost=361.05..361.07 rows=2 width=8) (actual time=44,029.172..44,146.653 rows=69,126 loops=1)

  • Group Key: e.cid, e.lease_interval_id
2. 139.399 44,070.087 ↓ 41,583.0 83,166 1

Sort (cost=361.05..361.06 rows=2 width=8) (actual time=44,029.168..44,070.087 rows=83,166 loops=1)

  • Sort Key: e.lease_interval_id
  • Sort Method: quicksort Memory: 6971kB
3. 103.652 43,930.688 ↓ 41,583.0 83,166 1

Hash Join (cost=29.25..361.04 rows=2 width=8) (actual time=13.125..43,930.688 rows=83,166 loops=1)

  • Hash Cond: (e.event_result_id = er.id)
4. 91.688 43,825.642 ↓ 794.3 96,903 1

Nested Loop (cost=0.81..332.29 rows=122 width=12) (actual time=11.723..43,825.642 rows=96,903 loops=1)

5. 9.941 9.941 ↓ 151.0 151 1

Function Scan on load_properties lp (cost=0.25..1.00 rows=1 width=4) (actual time=9.704..9.941 rows=151 loops=1)

  • Filter: ((is_disabled = 0) AND (is_test = 0))
  • Rows Removed by Filter: 6
6. 43,724.013 43,724.013 ↓ 5.3 642 151

Index Scan using idx_events_cid_etid_pid_event_datetime on events e (cost=0.56..330.06 rows=122 width=16) (actual time=0.329..289.563 rows=642 loops=151)

  • Index Cond: ((cid = 15077) AND (event_type_id = ANY ('{9,78}'::integer[])) AND (property_id = lp.property_id) AND (event_datetime < '2020-02-10 00:00:00-07'::timestamp with time zone))
  • Filter: (lease_interval_id IS NOT NULL)
  • Rows Removed by Filter: 0
7. 0.049 1.394 ↓ 1.0 97 1

Hash (cost=27.27..27.27 rows=93 width=8) (actual time=1.394..1.394 rows=97 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
8. 1.345 1.345 ↓ 1.0 97 1

Seq Scan on event_results er (cost=0.00..27.27 rows=93 width=8) (actual time=0.443..1.345 rows=97 loops=1)

  • Filter: ((cid = 15077) AND (2 = ANY (default_event_result_ids)))
  • Rows Removed by Filter: 474
Planning time : 5.052 ms