This isn't directly supported for **nonclustered** columnstore indexes. It does work for **clustered** columnstore. Azure Synapse Analytics has language support for doing it in one step e.g.: ``` CREATE CLUSTERED COLUMNSTORE INDEX <index_name> ON dbo.PropertyValue ORDER (PropertyId, Value); ``` This syntax has not yet made it to the SQL Server box product, though it is available under an undocumented feature flag so perhaps it isn't far away. It still won't work on a nonclustered columnstore index though. ### General Workaround The best you can do is to create the nonclustered **rowstore** index with `MAXDOP = 1`, then replace it with a nonclustered **columnstore** index with `MAXDOP = 1` and `DROP_EXISTING = ON`. This isn't guaranteed to preserve the ordering as you want, but it is highly likely: ``` CREATE NONCLUSTERED INDEX CS_IX_PropertyValue ON dbo.PropertyValue (PropertyId, Value) WITH (MAXDOP = 1); CREATE NONCLUSTERED COLUMNSTORE INDEX CS_IX_PropertyValue ON dbo.PropertyValue (PropertyId, Value) WITH (DROP_EXISTING = ON, MAXDOP = 1); ``` This will give you your best chance of achieving [rowgroup elimination][1] when filtering on `PropertyId`. ### Special Case When the desired ordering matches the rowstore clustered index (as appears to be the case in the question), there is no need to create a rowstore nonclustered index first. The [documentation says][2]: > Note, for nonclustered columnstore index (NCCI), if the base rowstore table has a clustered index, the rows are already ordered. In this case, the resultant nonclustered columnstore index will automatically be ordered. So, in your case, it should be enough to run only: ``` CREATE NONCLUSTERED COLUMNSTORE INDEX CS_IX_PropertyValue ON dbo.PropertyValue (PropertyId, Value) WITH (MAXDOP = 1); ``` See this [db<>fiddle demo][3]. [![fiddle results][4]][4] ### Metadata You can see the min and max values for each rowgroup and column using: ``` SELECT CSS.column_id, column_name = C.[name], rowgroup_id = CSS.segment_id, CSS.min_data_id, CSS.max_data_id, CSS.row_count FROM sys.partitions AS P JOIN sys.column_store_segments AS CSS ON CSS.hobt_id = P.hobt_id JOIN sys.indexes AS I ON I.[object_id] = P.[object_id] AND I.index_id = P.index_id JOIN sys.index_columns AS IC ON IC.[object_id] = I.[object_id] AND IC.index_id = I.index_id AND IC.index_column_id = CSS.column_id JOIN sys.columns AS C ON C.[object_id] = P.[object_id] AND C.column_id = IC.column_id WHERE P.[object_id] = OBJECT_ID(N'dbo.PropertyValue', N'U') ORDER BY C.column_id, CSS.segment_id; ``` [1]: https://techcommunity.microsoft.com/t5/sql-server/columnstore-index-performance-rowgroup-elimination/ba-p/385034 [2]: https://learn.microsoft.com/en-us/sql/relational-databases/indexes/columnstore-indexes-query-performance#recommendations-for-improving-query-performance [3]: https://dbfiddle.uk/?rdbms=sqlserver_2019&fiddle=8af9375320c889339475dcbb98a8c618 [4]: https://i.sstatic.net/XLIHK.png