2

On SQL Server 2012, I want to index a table with a columnstore index. But an error message apears:

Msg 35338, Level 16, State 1, Line 1
Clustered columnstore index is not supported.

My code is :

CREATE TABLE [dbo].[Card](
    [CardId] [int] IDENTITY(1,1) NOT NULL,
    [CardSerialNumber] [varchar](19) NULL,
    [CreateDate] [datetime] NOT NULL
) ON [PRIMARY]

GO
CREATE CLUSTERED COLUMNSTORE INDEX cci_Simple ON [dbo].[Card]
0

1 Answer 1

9

SQL Server 2012 only supports the creation of nonclustered columnstore indexes. Change your code to:

CREATE NONCLUSTERED COLUMNSTORE INDEX cci_Simple ON [dbo].[Card]

In SQL Server 2012 this will make your table read-only. You should probably look at adding all three columns of the table to the columnstore index but I'll leave that to your testing.

Note that columnstore indexes also require Enterprise Edition.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.