explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Kqev

Settings
# exclusive inclusive rows x rows loops node
1. 507.146 7,758.942 ↓ 8.8 1,318 1

Nested Loop (cost=159,267.04..159,695.41 rows=149 width=76) (actual time=7,232.537..7,758.942 rows=1,318 loops=1)

2. 2.519 7,237.298 ↓ 8.8 1,318 1

Finalize GroupAggregate (cost=159,266.62..159,285.05 rows=149 width=24) (actual time=7,231.330..7,237.298 rows=1,318 loops=1)

  • Group Key: o_1.id, e.mean_id, e.pair_start
3. 54.716 7,234.779 ↓ 16.3 2,018 1

Gather Merge (cost=159,266.62..159,282.32 rows=124 width=24) (actual time=7,231.320..7,234.779 rows=2,018 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 0.726 7,180.063 ↓ 10.9 673 3 / 3

Partial GroupAggregate (cost=158,266.59..158,267.99 rows=62 width=24) (actual time=7,179.105..7,180.063 rows=673 loops=3)

  • Group Key: o_1.id, e.mean_id, e.pair_start
5. 1.150 7,179.337 ↓ 13.4 833 3 / 3

Sort (cost=158,266.59..158,266.75 rows=62 width=24) (actual time=7,179.096..7,179.337 rows=833 loops=3)

  • Sort Key: o_1.id, e.mean_id, e.pair_start
  • Sort Method: quicksort Memory: 83kB
  • Worker 0: Sort Method: quicksort Memory: 73kB
  • Worker 1: Sort Method: quicksort Memory: 71kB
6. 205.103 7,178.187 ↓ 13.4 833 3 / 3

Hash Join (cost=314.60..158,264.75 rows=62 width=24) (actual time=442.488..7,178.187 rows=833 loops=3)

  • Hash Cond: ((o_1.agency_id)::numeric = a.id)
7. 443.230 6,968.779 ↓ 5.6 186,260 3 / 3

Nested Loop (cost=0.98..157,859.24 rows=33,384 width=28) (actual time=0.236..6,968.779 rows=186,260 loops=3)

8. 3,172.875 3,172.875 ↓ 5.6 186,260 3 / 3

Parallel Index Scan using es_event_pairing_idx on es_event e (cost=0.56..100,958.46 rows=33,384 width=24) (actual time=0.144..3,172.875 rows=186,260 loops=3)

  • Index Cond: ((name = ANY ('{ORDER_IS_PAIR,ORDER_IS_UNPAIR}'::text[])) AND (pair_start >= '2019-12-01 00:00:00'::timestamp without time zone))
9. 3,352.674 3,352.674 ↑ 1.0 1 558,779 / 3

Index Scan using es_order_pk on es_order o_1 (cost=0.43..1.70 rows=1 width=8) (actual time=0.018..0.018 rows=1 loops=558,779)

  • Index Cond: (id = e.order_id)
10. 0.023 4.305 ↑ 1.0 9 3 / 3

Hash (cost=313.50..313.50 rows=9 width=5) (actual time=4.305..4.305 rows=9 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 4.282 4.282 ↑ 1.0 9 3 / 3

Seq Scan on agencies a (cost=0.00..313.50 rows=9 width=5) (actual time=3.371..4.282 rows=9 loops=3)

  • Filter: (organization_id = '5660'::numeric)
  • Rows Removed by Filter: 5206
12. 14.498 14.498 ↑ 1.0 1 1,318

Index Scan using es_order_pk on es_order o (cost=0.43..2.43 rows=1 width=956) (actual time=0.011..0.011 rows=1 loops=1,318)

  • Index Cond: (id = o_1.id)
Planning time : 0.687 ms
Execution time : 7,759.512 ms