explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 96Cj : Optimization for: Optimization for: Optimization for: Optimization for: plan #KKHm; plan #qfJN; plan #uBx; plan #rrDY

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 2,683.358 22,573.567 ↓ 22.6 3,255,665 1

WindowAgg (cost=525,406.37..531,177.89 rows=144,288 width=196) (actual time=19,091.803..22,573.567 rows=3,255,665 loops=1)

2. 8,678.907 19,890.209 ↓ 22.6 3,255,665 1

Sort (cost=525,406.37..525,767.09 rows=144,288 width=180) (actual time=19,091.789..19,890.209 rows=3,255,665 loops=1)

  • Sort Key: year, time_period, origin_grouper, origin_rollup, destination_grouper, destination_rollup, aircraft_type_grouper, (sum(legality_value))
  • Sort Method: external merge Disk: 235,808kB
3. 2,030.238 11,211.302 ↓ 22.6 3,255,665 1

GroupAggregate (cost=455,488.53..500,217.90 rows=144,288 width=180) (actual time=7,900.550..11,211.302 rows=3,255,665 loops=1)

  • Group Key: year, time_period, competitor_id, origin_grouper, destination_grouper, origin_rollup, destination_rollup, aircraft_type_grouper
4. 8,521.922 9,181.064 ↓ 2.3 3,255,665 1

Sort (cost=455,488.53..459,095.74 rows=1,442,883 width=180) (actual time=7,900.539..9,181.064 rows=3,255,665 loops=1)

  • Sort Key: year, time_period, competitor_id, origin_grouper, destination_grouper, origin_rollup, destination_rollup, aircraft_type_grouper
  • Sort Method: external merge Disk: 235,808kB
5. 659.142 659.142 ↓ 2.3 3,255,665 1

Seq Scan on ra (cost=0.00..51,425.83 rows=1,442,883 width=180) (actual time=0.060..659.142 rows=3,255,665 loops=1)

Planning time : 0.190 ms
Execution time : 24,477.258 ms