explain.depesz.com

PostgreSQL's explain analyze made readable

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

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 761.526 119,477.656 ↓ 1.8 156,569 1

Gather (cost=980,677.02..1,066,957.02 rows=88,049 width=316) (actual time=110,241.531..119,477.656 rows=156,569 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 1,982.595 118,716.130 ↓ 1.4 52,190 3 / 3

Merge Left Join (cost=979,677.02..1,057,152.12 rows=36,687 width=316) (actual time=110,140.605..118,716.130 rows=52,190 loops=3)

  • Merge Cond: ((lc2.year = aa.year) AND (lc2.time_period = aa.time_period) AND (lc2.origin_rollup = aa.origin_rollup) AND (lc2.destination_rollup = aa.destination_rollup) AND (lc2.origin_grouper = aa.origin_grouper) AND (lc2.destination_grouper = aa.destination_grouper) AND (lc2.aircraft_type_grouper = aa.aircraft_type_grouper))
3. 24.412 1,016.937 ↑ 3.3 11,176 3 / 3

Sort (cost=41,844.43..41,936.15 rows=36,687 width=65) (actual time=1,014.219..1,016.937 rows=11,176 loops=3)

  • Sort Key: lc2.year, lc2.time_period, lc2.origin_rollup, lc2.destination_rollup, lc2.origin_grouper, lc2.destination_grouper, lc2.aircraft_type_grouper
  • Sort Method: quicksort Memory: 1,971kB
  • Worker 0: Sort Method: quicksort Memory: 1,947kB
  • Worker 1: Sort Method: quicksort Memory: 1,950kB
4. 992.525 992.525 ↑ 3.3 11,176 3 / 3

Parallel Seq Scan on qr_legality_check_large lc2 (cost=0.00..39,063.01 rows=36,687 width=65) (actual time=5.499..992.525 rows=11,176 loops=3)

  • Filter: ((NOT is_legal) AND (num_competitors > 3))
  • Rows Removed by Filter: 730,584
5. 817.932 115,716.598 ↑ 1.0 3,395,019 3 / 3

Materialize (cost=937,832.58..954,820.58 rows=3,397,600 width=251) (actual time=109,114.030..115,716.598 rows=3,395,019 loops=3)

6. 113,779.846 114,898.666 ↑ 1.0 3,395,019 3 / 3

Sort (cost=937,832.58..946,326.58 rows=3,397,600 width=251) (actual time=109,114.026..114,898.666 rows=3,395,019 loops=3)

  • Sort Key: aa.year, aa.time_period, aa.origin_rollup, aa.destination_rollup, aa.origin_grouper, aa.destination_grouper, aa.aircraft_type_grouper
  • Sort Method: external merge Disk: 936,320kB
  • Worker 0: Sort Method: external merge Disk: 936,320kB
  • Worker 1: Sort Method: external merge Disk: 936,320kB
7. 1,118.820 1,118.820 ↑ 1.0 3,396,497 3 / 3

Seq Scan on all_agg_tmp aa (cost=0.00..162,808.00 rows=3,397,600 width=251) (actual time=0.576..1,118.820 rows=3,396,497 loops=3)

Planning time : 2.508 ms
Execution time : 119,666.721 ms