explain.depesz.com

PostgreSQL's explain analyze made readable

Result: h8Oa

Settings
# exclusive inclusive rows x rows loops node
1. 255.114 72,785.108 ↓ 1.1 208,986 1

Finalize GroupAggregate (cost=10,013,705.54..10,063,029.95 rows=185,535 width=43) (actual time=72,286.742..72,785.108 rows=208,986 loops=1)

  • Group Key: year, commodity_code
2. 0.000 72,529.994 ↓ 1.7 621,238 1

Gather Merge (cost=10,013,705.54..10,057,000.06 rows=371,070 width=43) (actual time=72,286.728..72,529.994 rows=621,238 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 3,043.851 216,531.267 ↓ 1.1 207,079 3

Sort (cost=10,012,705.51..10,013,169.35 rows=185,535 width=43) (actual time=72,146.226..72,177.089 rows=207,079 loops=3)

  • Sort Key: year, commodity_code
  • Sort Method: quicksort Memory: 22319kB
  • Worker 0: Sort Method: quicksort Memory: 22311kB
  • Worker 1: Sort Method: quicksort Memory: 22338kB
4. 92,426.571 213,487.416 ↓ 1.1 207,079 3

Partial HashAggregate (cost=9,994,150.78..9,996,469.96 rows=185,535 width=43) (actual time=71,042.519..71,162.472 rows=207,079 loops=3)

  • Group Key: year, commodity_code
5. 121,060.845 121,060.845 ↑ 1.2 76,144,543 3

Parallel Index Only Scan using agg_tf_part_partial on comtrade_data_annual (cost=0.57..8,808,451.13 rows=94,855,972 width=16) (actual time=1.277..40,353.615 rows=76,144,543 loops=3)

  • Filter: (partner_code <> 0)
  • Rows Removed by Filter: 4304729
  • Heap Fetches: 0
Planning time : 3.830 ms
Execution time : 72,803.561 ms