explain.depesz.com

PostgreSQL's explain analyze made readable

Result: kZGb

Settings
# exclusive inclusive rows x rows loops node
1. 522.179 14,203,205.614 ↑ 1.0 1 1

Limit (cost=30,387,563.28..30,387,563.60 rows=1 width=47) (actual time=14,202,683.437..14,203,205.614 rows=1 loops=1)

2. 0.000 14,202,683.435 ↑ 42,222,597.0 1 1

Finalize GroupAggregate (cost=30,387,563.28..43,992,049.00 rows=42,222,597 width=47) (actual time=14,202,683.434..14,202,683.435 rows=1 loops=1)

  • Group Key: year, commodity_code, reporter_code
3. 0.000 14,203,194.402 ↑ 42,222,597.0 2 1

Gather Merge (cost=30,387,563.28..42,408,701.61 rows=84,445,194 width=47) (actual time=14,202,671.273..14,203,194.402 rows=2 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
4. 657.828 38,572,578.429 ↑ 69,331.0 609 3

Partial GroupAggregate (cost=30,386,563.25..32,660,630.90 rows=42,222,597 width=47) (actual time=12,857,525.231..12,857,526.143 rows=609 loops=3)

  • Group Key: year, commodity_code, reporter_code
5. 38,330,235.441 38,571,920.601 ↑ 69,573.1 2,008 3

Sort (cost=30,386,563.25..30,735,820.29 rows=139,702,815 width=23) (actual time=12,857,306.425..12,857,306.867 rows=2,008 loops=3)

  • Sort Key: year, commodity_code, reporter_code
  • Sort Method: external merge Disk: 670864kB
  • Worker 0: Sort Method: external merge Disk: 670864kB
  • Worker 1: Sort Method: external merge Disk: 9844056kB
6. 241,685.160 241,685.160 ↑ 1.2 112,076,524 3

Parallel Seq Scan on comtrade_data_annual_refined (cost=0.00..9,849,175.00 rows=139,702,815 width=23) (actual time=51,281.326..80,561.720 rows=112,076,524 loops=3)

  • Filter: ((partner_code <> 0) AND (trade_flow_code = 2))
  • Rows Removed by Filter: 113533400