explain.depesz.com

PostgreSQL's explain analyze made readable

Result: lhBd

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 200.924 3,432.188 ↓ 1.2 28,000 1

Gather Merge (cost=57,060.64..59,804.36 rows=23,516 width=308) (actual time=3,367.384..3,432.188 rows=28,000 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
2. 7.240 3,231.264 ↑ 1.3 9,333 3 / 3

Sort (cost=56,060.61..56,090.01 rows=11,758 width=308) (actual time=3,229.508..3,231.264 rows=9,333 loops=3)

  • Sort Key: fn.amount DESC
  • Sort Method: quicksort Memory: 2391kB
  • Worker 0: Sort Method: quicksort Memory: 2717kB
  • Worker 1: Sort Method: quicksort Memory: 2395kB
3. 189.002 3,224.024 ↑ 1.3 9,333 3 / 3

Parallel Hash Join (cost=9,067.23..55,265.69 rows=11,758 width=308) (actual time=3,119.819..3,224.024 rows=9,333 loops=3)

  • Hash Cond: (fn.fdc_id = f.fdc_id)
4. 2,710.537 2,749.956 ↑ 1.3 9,333 3 / 3

Parallel Bitmap Heap Scan on food_nutrient fn (cost=655.14..44,397.52 rows=11,758 width=237) (actual time=137.585..2,749.956 rows=9,333 loops=3)

  • Recheck Cond: (nutrient_id = 1090)
  • Heap Blocks: exact=5304
5. 39.419 39.419 ↑ 1.0 28,000 1 / 3

Bitmap Index Scan on by_nutrient (cost=0.00..648.08 rows=28,220 width=0) (actual time=118.256..118.256 rows=28,000 loops=1)

  • Index Cond: (nutrient_id = 1090)
6. 71.877 285.066 ↑ 1.3 109,514 3 / 3

Parallel Hash (cost=5,095.93..5,095.93 rows=136,893 width=67) (actual time=285.065..285.066 rows=109,514 loops=3)

  • Buckets: 65536 Batches: 16 Memory Usage: 2496kB
7. 213.189 213.189 ↑ 1.3 109,514 3 / 3

Parallel Seq Scan on food f (cost=0.00..5,095.93 rows=136,893 width=67) (actual time=4.734..213.189 rows=109,514 loops=3)