Databases Reference
In-Depth Information
Now, let us see the execution plan of this SELECT statement:
2.
After seeing the effect of the index in a previous query, it is time to create a
columnstore index to see the magic. Remove the idx_refno clustered index,
so that rowstore doesn't affect the columnstore index. By doing this, we are also
ensuring that the columnstore index is not getting any performance help from the
rowstore index.
--dropping clustered index idx_refno
DROP INDEX idx_refno ON ordDemo
--creating columnstore index
CREATE NONCLUSTERED COLUMNSTORE INDEX
idx_columnstore_refno
ON ordDemo (Amount,refno)
3.
As we now have a columnstore index, run the same query we ran earlier with the
aggregate SUM and AVG functions, to see the effect of a columnstore index:
--executing same query after creating columnstore Index
--and observ execution plan
SELECT
 
Search WWH ::




Custom Search