Column has a data type that cannot participate in a columnstore index

alexithymia picture alexithymia · Mar 19, 2018 · Viewed 11.6k times · Source

I want to create a clustered columnstore index in a table using the following query:

CREATE CLUSTERED COLUMNSTORE INDEX cci
ON agl_20180319_bck

And I am getting this error:

Msg 35343, Level 16, State 1, Line 6 The statement failed. Column 'memberOf' has a data type that cannot participate in a columnstore index. Omit column 'memberOf'.

The 'memberOf' is in this format: memberOf(nvarchar(max)).

How to overcome/ignore this error and what does it mean?

Answer

Rigerta picture Rigerta · Mar 19, 2018

As per documentation:

Columns that use any of the following data types cannot be included in a columnstore index:

nvarchar(max), varchar(max), and varbinary(max) (Applies to SQL Server 2016 and prior versions, and nonclustered columnstore indexes)

Either change the type of the column (if you can) or just don't have a columnstore index on this specific column.