explain.depesz.com

PostgreSQL's explain analyze made readable

Result: JGmX

Settings
# exclusive inclusive rows x rows loops node
1. 0.003 20.841 ↑ 3.2 31 1

Limit (cost=8,778.08..8,778.33 rows=100 width=91) (actual time=20.837..20.841 rows=31 loops=1)

2. 0.050 20.838 ↑ 6.4 31 1

Sort (cost=8,778.08..8,778.58 rows=199 width=91) (actual time=20.836..20.838 rows=31 loops=1)

  • Sort Key: dt.d_year, (sum(store_sales.ss_sales_price)) DESC, item.i_brand_id
  • Sort Method: quicksort Memory: 29kB
3. 0.000 20.788 ↑ 6.4 31 1

Finalize GroupAggregate (cost=8,750.44..8,770.48 rows=199 width=91) (actual time=20.644..20.788 rows=31 loops=1)

  • Group Key: dt.d_year, item.i_brand, item.i_brand_id
4. 0.000 22.006 ↑ 3.8 31 1

Gather Merge (cost=8,750.44..8,766.53 rows=117 width=91) (actual time=20.629..22.006 rows=31 loops=1)

  • Workers Planned: 1
  • Workers Launched: 1
5. 0.164 34.408 ↑ 7.3 16 2

Partial GroupAggregate (cost=7,750.43..7,753.36 rows=117 width=91) (actual time=17.150..17.204 rows=16 loops=2)

  • Group Key: dt.d_year, item.i_brand, item.i_brand_id
6. 0.494 34.244 ↓ 1.2 144 2

Sort (cost=7,750.43..7,750.72 rows=117 width=65) (actual time=17.112..17.122 rows=144 loops=2)

  • Sort Key: dt.d_year, item.i_brand, item.i_brand_id
  • Sort Method: quicksort Memory: 50kB
7. 0.742 33.750 ↓ 1.2 144 2

Nested Loop (cost=6.06..7,746.41 rows=117 width=65) (actual time=1.959..16.875 rows=144 loops=2)

8. 0.664 29.046 ↑ 1.5 990 2

Nested Loop (cost=5.77..7,272.43 rows=1,506 width=65) (actual time=1.832..14.523 rows=990 loops=2)

9. 10.540 10.540 ↑ 1.5 6 2

Parallel Seq Scan on item (cost=0.00..1,362.35 rows=9 width=59) (actual time=1.715..5.270 rows=6 loops=2)

  • Filter: (i_manufact_id = 816)
  • Rows Removed by Filter: 8994
10. 17.292 17.842 ↓ 1.0 180 11

Bitmap Heap Scan on store_sales (cost=5.77..654.94 rows=173 width=14) (actual time=0.077..1.622 rows=180 loops=11)

  • Recheck Cond: (ss_item_sk = item.i_item_sk)
  • Heap Blocks: exact=1384
11. 0.550 0.550 ↓ 1.0 180 11

Bitmap Index Scan on store_sales_pkey (cost=0.00..5.73 rows=173 width=0) (actual time=0.050..0.050 rows=180 loops=11)

  • Index Cond: (ss_item_sk = item.i_item_sk)
12. 3.962 3.962 ↓ 0.0 0 1,981

Index Scan using date_dim_pkey on date_dim dt (cost=0.29..0.31 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=1,981)

  • Index Cond: (d_date_sk = store_sales.ss_sold_date_sk)
  • Filter: (d_moy = 11)
  • Rows Removed by Filter: 1