explain.depesz.com

PostgreSQL's explain analyze made readable

Result: LCWj

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

Sort (cost=919,967.12..919,991.90 rows=9,911 width=42) (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

HashAggregate (cost=919,210.18..919,309.29 rows=9,911 width=42) (actual rows= loops=)

3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=822.47..918,873.91 rows=22,418 width=42) (actual rows= loops=)

4. 0.000 0.000 ↓ 0.0

Hash Join (cost=822.05..906,290.60 rows=25,798 width=31) (actual rows= loops=)

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

Seq Scan on factinventory (cost=0.00..776,800.38 rows=25,682,038 width=16) (actual rows= loops=)

6. 0.000 0.000 ↓ 0.0

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

7. 0.000 0.000 ↓ 0.0

Seq Scan on dimdates (cost=0.00..821.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))))
8. 0.000 0.000 ↓ 0.0

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

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