Sql-server – Error 35338: Clustered columnstore index is not supported

columnstoresql serversql-server-2012

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]

Best Answer

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.