HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

Can a table have Both a Clustered Columnstore Index and Nonclustered Columnstore Index?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
clusteredcantablecolumnstorebothnonclusteredandindexhave

Problem

Can I a table have both Clustered Columnstore Index and Nonclustered Columnstore Index?

I am seeing example strategies to use Clustered Columnstore Indexes with only Nonclustered Binary row indexes.

When I try creating both a Clustered Columnstore and Nonclustered Columnstore
I receive error:

Msg 35339, Level 16, State 1, Line 7
Multiple columnstore indexes are not supported.

Solution

No, you can't:

CREATE TABLE dbo.cs_test (id INT NOT NULL)

CREATE CLUSTERED COLUMNSTORE INDEX cs_whatever ON dbo.cs_test

CREATE NONCLUSTERED COLUMNSTORE INDEX nc_whatever ON dbo.cs_test(id);


Returns the error message:


Msg 35339, Level 16, State 1, Line 7 Multiple columnstore indexes are
not supported.

The same result for multiple nonclustered columnstore indexes, as well.

Code Snippets

CREATE TABLE dbo.cs_test (id INT NOT NULL)

CREATE CLUSTERED COLUMNSTORE INDEX cs_whatever ON dbo.cs_test

CREATE NONCLUSTERED COLUMNSTORE INDEX nc_whatever ON dbo.cs_test(id);

Context

StackExchange Database Administrators Q#218674, answer score: 6

Revisions (0)

No revisions yet.