explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ja9k

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 9,810.160 ↓ 8.8 1,318 1

Finalize GroupAggregate (cost=159,265.78..159,284.22 rows=149 width=24) (actual time=9,806.028..9,810.160 rows=1,318 loops=1)

  • Group Key: o.id, e.mean_id, e.pair_start
2. 111.856 9,897.745 ↓ 16.4 2,037 1

Gather Merge (cost=159,265.78..159,281.49 rows=124 width=24) (actual time=9,806.014..9,897.745 rows=2,037 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1.461 9,785.889 ↓ 11.0 679 3 / 3

Partial GroupAggregate (cost=158,265.76..158,267.15 rows=62 width=24) (actual time=9,784.313..9,785.889 rows=679 loops=3)

  • Group Key: o.id, e.mean_id, e.pair_start
4. 1.047 9,784.428 ↓ 13.4 833 3 / 3

Sort (cost=158,265.76..158,265.91 rows=62 width=24) (actual time=9,784.303..9,784.428 rows=833 loops=3)

  • Sort Key: o.id, e.mean_id, e.pair_start
  • Sort Method: quicksort Memory: 121kB
  • Worker 0: Sort Method: quicksort Memory: 76kB
  • Worker 1: Sort Method: quicksort Memory: 54kB
5. 286.649 9,783.381 ↓ 13.4 833 3 / 3

Hash Join (cost=314.60..158,263.91 rows=62 width=24) (actual time=387.179..9,783.381 rows=833 loops=3)

  • Hash Cond: ((o.agency_id)::numeric = a.id)
6. 536.847 9,490.723 ↓ 5.6 186,230 3 / 3

Nested Loop (cost=0.98..157,858.41 rows=33,384 width=28) (actual time=0.154..9,490.723 rows=186,230 loops=3)

7. 4,298.134 4,298.134 ↓ 5.6 186,230 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.088..4,298.134 rows=186,230 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))
8. 4,655.742 4,655.742 ↑ 1.0 1 558,689 / 3

Index Scan using es_order_pk on es_order o (cost=0.43..1.70 rows=1 width=8) (actual time=0.025..0.025 rows=1 loops=558,689)

  • Index Cond: (id = e.order_id)
9. 0.019 6.009 ↑ 1.0 9 3 / 3

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
10. 5.990 5.990 ↑ 1.0 9 3 / 3

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

  • Filter: (organization_id = '5660'::numeric)
  • Rows Removed by Filter: 5205
Planning time : 0.577 ms
Execution time : 9,899.095 ms