explain.depesz.com

PostgreSQL's explain analyze made readable

Result: uBx : Optimization for: Optimization for: plan #KKHm; plan #qfJN

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 1,536.165 7,596.632 ↓ 9.6 3,255,665 1

Finalize GroupAggregate (cost=395,004.26..530,878.17 rows=339,671 width=60) (actual time=3,229.410..7,596.632 rows=3,255,665 loops=1)

  • Group Key: origin_grouper, destination_grouper, origin_rollup, destination_rollup, year, time_period, competitor_id, aircraft_type_grouper
2. 1,438.080 6,060.467 ↓ 4.9 3,321,404 1

Gather Merge (cost=395,004.26..512,196.27 rows=679,342 width=60) (actual time=3,229.396..6,060.467 rows=3,321,404 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 654.302 4,622.387 ↓ 3.3 1,107,135 3 / 3

Partial GroupAggregate (cost=394,004.23..432,783.32 rows=339,671 width=60) (actual time=3,212.858..4,622.387 rows=1,107,135 loops=3)

  • Group Key: origin_grouper, destination_grouper, origin_rollup, destination_rollup, year, time_period, competitor_id, aircraft_type_grouper
4. 3,486.366 3,968.085 ↑ 1.3 1,132,166 3 / 3

Sort (cost=394,004.23..397,542.47 rows=1,415,295 width=60) (actual time=3,212.845..3,968.085 rows=1,132,166 loops=3)

  • Sort Key: origin_grouper, destination_grouper, origin_rollup, destination_rollup, year, time_period, competitor_id, aircraft_type_grouper
  • Sort Method: external merge Disk: 82,128kB
  • Worker 0: Sort Method: external merge Disk: 82,000kB
  • Worker 1: Sort Method: external merge Disk: 82,000kB
5. 481.719 481.719 ↑ 1.3 1,132,166 3 / 3

Parallel Seq Scan on "ALL_AGG" da (cost=0.00..142,984.95 rows=1,415,295 width=60) (actual time=0.066..481.719 rows=1,132,166 loops=3)

Planning time : 0.083 ms
Execution time : 9,391.682 ms