explain.depesz.com

PostgreSQL's explain analyze made readable

Result: hMdN

Settings
# exclusive inclusive rows x rows loops node
1. 0.005 0.081 ↓ 2.0 14 1

Nested Loop (cost=3.94..7.48 rows=7 width=464) (actual time=0.068..0.081 rows=14 loops=1)

2. 0.003 0.060 ↓ 2.0 2 1

HashAggregate (cost=3.65..3.66 rows=1 width=4) (actual time=0.060..0.060 rows=2 loops=1)

  • Group Key: es_event_1.order_id
3. 0.007 0.057 ↓ 2.0 2 1

GroupAggregate (cost=3.61..3.64 rows=1 width=12) (actual time=0.054..0.057 rows=2 loops=1)

  • Group Key: es_event_1.order_id, es_event_1.pair_start
  • Filter: ((max(es_event_1.pair_end) IS NULL) OR (max(es_event_1.pair_end) <= '2019-12-31 21:06:49'::timestamp without time zone))
  • Rows Removed by Filter: 3
4. 0.008 0.050 ↓ 10.0 10 1

Sort (cost=3.61..3.62 rows=1 width=20) (actual time=0.049..0.050 rows=10 loops=1)

  • Sort Key: es_event_1.order_id, es_event_1.pair_start
  • Sort Method: quicksort Memory: 25kB
5. 0.042 0.042 ↓ 10.0 10 1

Index Scan using es_event_pairing_idx on es_event es_event_1 (cost=0.29..3.60 rows=1 width=20) (actual time=0.019..0.042 rows=10 loops=1)

  • Index Cond: ((name = ANY ('{ORDER_IS_PAIR,ORDER_IS_UNPAIR}'::text[])) AND (mean_id = 7732) AND ('2019-12-31 21:06:49'::timestamp without time zone >= pair_start))
6. 0.016 0.016 ↑ 1.0 7 2

Index Scan using es_event_order_id_idx on es_event (cost=0.29..3.74 rows=7 width=464) (actual time=0.006..0.008 rows=7 loops=2)

  • Index Cond: (order_id = es_event_1.order_id)
Planning time : 0.252 ms
Execution time : 0.119 ms