I want to try the column store index in SQL Server and im trying to get my queries to run in batch mode, i rewrote my query this way( it had an outer join before) but the execution plan still show that is running in row mode. Can anyone advice me in how to rewrite the query? i really thought this would work but it didnt.
WITH T (dim_facil_dkey, countDiv) AS( SELECT f.dim_facil_dkey, COUNT(d.division)countDiv FROM dbo.fact_orderstatus f JOIN dbo.dim_divisions d on f.dim_divisions_dkey= d.dim_divisions_dkey GROUP BY f.Dim_facil_dKey ) SELECT DISTINCT f.dim_facil_dkey, ISNULL (T.countDiv, 0) as countDiv FROM dbo.fact_orderstatus f LEFT OUTER JOIN T on f.dim_facil_dkey = T.dim_facil_dkey ORDER BY ISNULL(T.countDiv, 0) desc
Thanks in advance!