explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sQ9f

Settings
# exclusive inclusive rows x rows loops node
1. 2,020.456 10,173.387 ↑ 1.0 2,199,216 1

Hash Left Join (cost=228,556.34..415,655.71 rows=2,227,675 width=41) (actual time=4,550.587..10,173.387 rows=2,199,216 loops=1)

  • Hash Cond: ((s.store_key = stock_sales.store_key) AND (s.article_key = stock_sales.article_key) AND (s.color_key = stock_sales.color_key) AND (s.size_key = stock_sales.size_key))
2. 3,670.840 3,670.840 ↑ 1.0 2,199,216 1

Seq Scan on skus s (cost=0.00..136,414.78 rows=2,227,675 width=23) (actual time=3.201..3,670.840 rows=2,199,216 loops=1)

  • Filter: (date_max >= (now() - '28 days'::interval))
  • Rows Removed by Filter: 3079743
3. 84.278 4,482.091 ↓ 1.0 205,378 1

Hash (cost=223,315.74..223,315.74 rows=202,630 width=18) (actual time=4,482.091..4,482.091 rows=205,378 loops=1)

  • Buckets: 65536 Batches: 4 Memory Usage: 3324kB
4. 199.404 4,397.813 ↓ 1.0 205,378 1

GroupAggregate (cost=216,100.99..221,289.44 rows=202,630 width=18) (actual time=4,066.153..4,397.813 rows=205,378 loops=1)

  • Group Key: stock_sales.store_key, stock_sales.article_key, stock_sales.color_key, stock_sales.size_key
5. 529.836 4,198.409 ↓ 2.0 431,719 1

Sort (cost=216,100.99..216,628.02 rows=210,810 width=12) (actual time=4,066.144..4,198.409 rows=431,719 loops=1)

  • Sort Key: stock_sales.store_key, stock_sales.article_key, stock_sales.color_key, stock_sales.size_key
  • Sort Method: external merge Disk: 10144kB
6. 3,574.016 3,668.573 ↓ 2.0 431,719 1

Bitmap Heap Scan on stock_sales (cost=4,477.25..193,854.50 rows=210,810 width=12) (actual time=96.429..3,668.573 rows=431,719 loops=1)

  • Recheck Cond: ((date_key < now()) AND (date_key >= (now() - '28 days'::interval)))
  • Heap Blocks: exact=7820
7. 94.557 94.557 ↓ 2.0 431,719 1

Bitmap Index Scan on stock_sales_date_key_idx (cost=0.00..4,424.55 rows=210,810 width=0) (actual time=94.557..94.557 rows=431,719 loops=1)

  • Index Cond: ((date_key < now()) AND (date_key >= (now() - '28 days'::interval)))