Databases Reference
In-Depth Information
Refno
,sum(Amount) as SumAmt
,avg(Amount) as AvgAmt
FROM
ordDemo
WHERE
Refno>3
Group By
Refno
Order By
Refno
GO
4.
As soon as the execution plan is generated, we can see the magical difference in
operator cost, as shown in the following screenshot:
5.
After comparing the result sets of both queries, it is clear that both queries return
the same number of rows. But, if you see the I/O cost before the columnstore index,
it is 0.358681, and after the columnstore index, it is only 0.003125 . See how big
difference is?
 
Search WWH ::




Custom Search