Reputation: 25
Is it possible to create a column store index on a table in sql which already has a clustered index & non clustered index over it
Upvotes: 2
Views: 5711
Reputation: 387
Yes it's possible. Example:
CREATE TABLE SimpleTable
(ProductKey [int] NOT NULL,
OrderDateKey [int] NOT NULL,
DueDateKey [int] NOT NULL,
ShipDateKey [int] NOT NULL);
GO
CREATE CLUSTERED INDEX cl_simple ON SimpleTable (ProductKey);
GO
CREATE NONCLUSTERED INDEX noncl_simple ON SimpleTable(OrderDateKey);
GO
CREATE NONCLUSTERED COLUMNSTORE INDEX csindx_simple
ON SimpleTable
(OrderDateKey, DueDateKey, ShipDateKey);
GO
Upvotes: 3