How to create a Columnstore Index

Each table can have only 1 columnstore index, data from the index is stored in memory in the xVelocity engine.  Once a columnstore index has been created on a table you cannot update the table.  Microsoft recommends you take the following actions to update the data in a table containing a columnstore index.

Drop the columnstore index and then perform any required INSERT, DELETE, UPDATE, or MERGE operations.  To complete the refresh rebuild the columnstore index. (Source Technet)

T-SQL

CREATE NONCLUSTERED COLUMNSTORE INDEX csindx_Table1
ON Table1
(DateKey, ProductKey, CustomerKey);

 

Leave a Reply

Your email address will not be published. Required fields are marked *