explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Unjs

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Sort (cost=670,272.54..670,328.25 rows=22,285 width=66) (actual rows= loops=)

  • Sort Key: (CASE WHEN (dimdates.cal_year IS NULL) THEN 1 ELSE 0 END), (CASE WHEN (dimdates.cal_qtr IS NULL) THEN 1 ELSE 0 END), dimdates.cal_qtr, (CASE WHEN (dimdates.cal_month_name IS NULL) THEN 1 ELSE 0 END), dimdates.cal_month_name, (CASE WHEN (dimproducts.subcategoryid IS NULL) THEN 1 ELSE 0 END), dimproducts.subcategoryid, (CASE WHEN (dimproducts.subcategorydescription IS NULL) THEN 1 ELSE 0 END), dimproducts.subcategorydescription, (CASE WHEN (dimproducts.typeid IS NULL) THEN 1 ELSE 0 END), dimproducts.typeid
2. 0.000 0.000 ↓ 0.0

Group (cost=666,078.67..668,663.14 rows=22,285 width=66) (actual rows= loops=)

  • Group Key: dimdates.cal_year, dimdates.cal_qtr, dimdates.cal_month_name, dimproducts.subcategoryid, dimproducts.subcategorydescription, dimproducts.typeid
3. 0.000 0.000 ↓ 0.0

Gather Merge (cost=666,078.67..668,384.59 rows=18,570 width=42) (actual rows= loops=)

  • Workers Planned: 2
4. 0.000 0.000 ↓ 0.0

Group (cost=665,078.64..665,241.13 rows=9,285 width=42) (actual rows= loops=)

  • Group Key: dimdates.cal_year, dimdates.cal_qtr, dimdates.cal_month_name, dimproducts.subcategoryid, dimproducts.subcategorydescription, dimproducts.typeid
5. 0.000 0.000 ↓ 0.0

Sort (cost=665,078.64..665,101.85 rows=9,285 width=42) (actual rows= loops=)

  • Sort Key: dimdates.cal_qtr, dimdates.cal_month_name, dimproducts.subcategoryid, dimproducts.subcategorydescription, dimproducts.typeid
6. 0.000 0.000 ↓ 0.0

Nested Loop (cost=806.47..664,466.73 rows=9,285 width=42) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Hash Join (cost=806.05..658,333.90 rows=10,754 width=31) (actual rows= loops=)

  • Hash Cond: ((factinventory.createdatekey)::double precision = dimdates.datekey)
8. 0.000 0.000 ↓ 0.0

Parallel Seq Scan on factinventory (cost=0.00..628,082.22 rows=10,705,322 width=16) (actual rows= loops=)

9. 0.000 0.000 ↓ 0.0

Hash (cost=805.77..805.77 rows=22 width=31) (actual rows= loops=)

10. 0.000 0.000 ↓ 0.0

Seq Scan on dimdates (cost=0.00..805.77 rows=22 width=31) (actual rows= loops=)

  • Filter: ((cal_year = '2020'::double precision) AND (((cal_qtr = '1'::double precision) AND ((cal_month_name)::text = ANY ('{02-Feb,03-Mar}'::text[]))) OR ((cal_qtr = '2'::double precision) AND ((cal_month_name)::text = '04-Apr'::text))))
11. 0.000 0.000 ↓ 0.0

Index Scan using idx_dimproducts_tk on dimproducts (cost=0.42..0.56 rows=1 width=27) (actual rows= loops=)

  • Index Cond: (productkey = factinventory.productkey)
  • Filter: (((typeid)::text <> 'PKG'::text) OR (typeid IS NULL))