Skip to content

Commit b6d7208

Browse files
Update ordered columnstore availability and details
1 parent 66bfd78 commit b6d7208

14 files changed

Lines changed: 209 additions & 149 deletions
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
author: dimitri-furman
3+
ms.author: dfurman
4+
ms.date: 02/28/2025
5+
ms.service: sql
6+
ms.topic: include
7+
---
8+
Azure SQL Database and Azure SQL Managed Instance with the always-up-to-date update policy

docs/relational-databases/indexes/columnstore-indexes-data-warehouse.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Columnstore indexes in data warehousing"
33
description: Learn more about how to benefit from columnstore indexes in data warehousing with the SQL Database Engine.
44
author: MikeRayMSFT
55
ms.author: mikeray
6-
ms.date: 10/23/2024
6+
ms.date: 02/28/2025
77
ms.service: sql
88
ms.subservice: table-view-index
99
ms.topic: conceptual
@@ -30,7 +30,7 @@ monikerRange: ">=aps-pdw-2016 || =azuresqldb-current || >=sql-server-2016 || >=s
3030
- Aggregate Pushdown for efficient processing of aggregates. This is supported on all database compatibility levels.
3131
- String predicate pushdown for efficient processing of string predicates. This is supported on all database compatibility levels.
3232
- Snapshot isolation for database compatibility level 130 and higher.
33-
- Ordered cluster columnstore indexes were introduced with [!INCLUDE [sql-server-2022](../../includes/sssql22-md.md)]. For more information, see [CREATE COLUMNSTORE INDEX](../../t-sql/statements/create-columnstore-index-transact-sql.md#order-for-clustered-columnstore) and [Performance tuning with ordered clustered columnstore indexes](ordered-columnstore-indexes.md). For ordered columnstore index availability, see [Ordered column index availability](columnstore-indexes-overview.md#ordered-columnstore-index-availability).
33+
- Ordered clustered columnstore indexes were introduced with [!INCLUDE [sql-server-2022](../../includes/sssql22-md.md)]. For more information, see [CREATE COLUMNSTORE INDEX](../../t-sql/statements/create-columnstore-index-transact-sql.md#order-for-clustered-columnstore) and [Performance tuning with ordered columnstore indexes](ordered-columnstore-indexes.md). For ordered columnstore index availability, see [Ordered column index availability](columnstore-indexes-overview.md#ordered-columnstore-index-availability).
3434

3535
For more information about new features in versions and platforms of SQL Server and Azure SQL, see [What's new in columnstore indexes](columnstore-indexes-what-s-new.md).
3636

docs/relational-databases/indexes/columnstore-indexes-design-guidance.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Columnstore indexes - Design guidance"
33
description: "High-level recommendations for designing columnstore indexes."
44
author: MikeRayMSFT
55
ms.author: mikeray
6-
ms.date: 10/23/2024
6+
ms.date: 02/28/2025
77
ms.service: sql
88
ms.subservice: table-view-index
99
ms.topic: conceptual
@@ -42,7 +42,7 @@ Here is a summary of the options and recommendations.
4242
| Columnstore option | Recommendations for when to use | Compression |
4343
| :----------------- | :------------------- | :---------- |
4444
| [Clustered columnstore index](#use-a-clustered-columnstore-index-for-large-data-warehouse-tables) | Use for:<br /><br />1) Traditional data warehouse workload with a star or snowflake schema<br /><br />2) Internet of Things (IOT) workloads that insert large volumes of data with minimal updates and deletes. | Average of 10x |
45-
| [Ordered clustered columnstore index](#use-an-ordered-clustered-columnstore-index-for-large-data-warehouse-tables) | Use when a clustered columnstore index is queried via a single ordered predicate column or column set. This guidance is similar to choosing the key column(s) for a rowstore clustered index, though the compressed underlying rowgroups behave differently. For more information, see [CREATE COLUMNSTORE INDEX](../../t-sql/statements/create-columnstore-index-transact-sql.md#order-for-clustered-columnstore) and [Performance tuning with ordered clustered columnstore indexes](ordered-columnstore-indexes.md). | Average of 10x |
45+
| [Ordered columnstore index](#use-an-ordered-clustered-columnstore-index-for-large-data-warehouse-tables) | Use when a clustered columnstore index is queried via a single ordered predicate column or column set. This guidance is similar to choosing the key column(s) for a rowstore clustered index, though the compressed underlying rowgroups behave differently. For more information, see [CREATE COLUMNSTORE INDEX](../../t-sql/statements/create-columnstore-index-transact-sql.md#order-for-clustered-columnstore) and [Performance tuning with ordered columnstore indexes](ordered-columnstore-indexes.md). | Average of 10x |
4646
| [Nonclustered B-tree indexes on a clustered columnstore index](#add-b-tree-nonclustered-indexes-for-efficient-table-seeks) | Use to:<br /><br /> 1. Enforce primary key and foreign key constraints on a clustered columnstore index.<br /><br /> 2. Speed up queries that search for specific values or small ranges of values.<br /><br /> 3. Speed up updates and deletes of specific rows.| 10x on average plus some additional storage for the NCIs.|
4747
| [Nonclustered columnstore index on a disk-based heap or B-tree index](#add-b-tree-nonclustered-indexes-for-efficient-table-seeks) | Use for:<br /><br />1) An OLTP workload that has some analytics queries. You can drop B-tree indexes created for analytics and replace them with one nonclustered columnstore index.<br /><br />2) Many traditional OLTP workloads that perform Extract Transform and Load (ETL) operations to move data to a separate data warehouse. You can eliminate ETL and a separate data warehouse by creating a nonclustered columnstore index on some of the OLTP tables. | NCCI is an additional index that requires 10% more storage on average.|
4848
| [Columnstore index on an in-memory table](#use-a-nonclustered-columnstore-index-for-real-time-analytics) | Same recommendations as nonclustered columnstore index on a disk-based table, except the base table is an in-memory table. | Columnstore index is an additional index.|
@@ -66,22 +66,22 @@ Don't use a clustered columnstore index when:
6666

6767
For more information, see [Columnstore indexes in data warehousing](columnstore-indexes-data-warehouse.md).
6868

69-
## Use an ordered clustered columnstore index for large data warehouse tables
69+
## Use an ordered columnstore index for large data warehouse tables
7070

7171
For ordered columnstore index availability, see [Columnstore indexes: Overview](columnstore-indexes-overview.md#ordered-columnstore-index-availability).
7272

73-
Consider using an ordered clustered columnstore index in the following scenarios:
73+
Consider using an ordered columnstore index in the following scenarios:
7474

75-
- When data is relatively static (without frequently writes and deletes) and the ordered clustered columnstore index key is static, ordered clustered columnstore indexes can provide significant performance advantages over non-ordered clustered columnstore indexes or rowstore clustered indexes for analytical workloads.
76-
- The more distinct values in the first column of the ordered clustered columnstore index key, the better the performance gains might be for ordered clustered columnstore indexes. This is due to improved segment elimination for string data. For more information, see [segment elimination](columnstore-indexes-query-performance.md#segment-elimination).
77-
- Choose an ordered clustered columnstore index key that will be frequently queried and can benefit from segment elimination, especially the first column of the key. Performance gains due to segment elimination on other columns in the table will be less predictable.
78-
- Use cases where only the most recent analytical data must be queried, for example, the last 15 seconds, ordered clustered columnstore indexes can provide segment elimination for older data. The first column in the key of the ordered clustered columnstore data must be the date/time data, such as an inserted or created date/time. The segment elimination would be more effective in an ordered clustered columnstore index than in an unordered clustered columnstore index.
79-
- Consider ordered clustered columnstore indexes on tables containing keys with GUID data, where the uniqueidentifier data type can now be used for [segment elimination](columnstore-indexes-query-performance.md#segment-elimination).
75+
- When data is relatively static (without frequently writes and deletes) and the ordered columnstore index key is static, ordered columnstore indexes can provide significant performance advantages over non-ordered columnstore indexes or rowstore indexes for analytical workloads.
76+
- The more distinct values in the first column of the ordered columnstore index key, the better the performance gains might be. This is due to improved segment elimination for string data. For more information, see [segment elimination](columnstore-indexes-query-performance.md#segment-elimination).
77+
- Choose an ordered columnstore index key that is frequently queried and can benefit from segment elimination, especially the first column of the key. Performance gains due to segment elimination on other columns in the table are less predictable.
78+
- Use cases where only the most recent analytical data must be queried, for example, the last 15 seconds, ordered columnstore indexes can provide segment elimination for older data. The first column in the key of the ordered columnstore data must be the date/time data, such as an inserted or created date/time. The segment elimination would be more effective in an ordered columnstore index than in an unordered columnstore index.
79+
- Consider ordered columnstore indexes on tables containing keys with GUID data, where the uniqueidentifier data type can now be used for [segment elimination](columnstore-indexes-query-performance.md#segment-elimination).
8080

81-
A ordered clustered columnstore index might not be as effective in these scenarios:
81+
A ordered columnstore index might not be as effective in these scenarios:
8282

8383
- Similar to other columnstore indexes, a high rate of insert activity could create excessive storage I/O.
84-
- For workloads where there are a lot of write operations, the quality of segment elimination will be reduced over time because of rowgroup maintenance by the tuple mover. This can be mitigated by regular maintenance of the columnstore index with ALTER INDEX REORGANIZE.
84+
- For workloads where there are a lot of write operations, the quality of segment elimination will be reduced over time because of rowgroup maintenance by the tuple mover. This can be mitigated by regular maintenance of the columnstore index with `ALTER INDEX REORGANIZE`.
8585

8686
## Add B-tree nonclustered indexes for efficient table seeks
8787

docs/relational-databases/indexes/columnstore-indexes-overview.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ title: "Columnstore indexes: Overview"
33
description: "An overview on columnstore indexes. Columnstore indexes are the standard for storing and querying large data warehousing fact tables."
44
author: MikeRayMSFT
55
ms.author: mikeray
6-
ms.date: 11/01/2024
6+
ms.reviewer: dfurman
7+
ms.date: 02/28/2025
78
ms.service: sql
89
ms.subservice: table-view-index
910
ms.topic: conceptual
@@ -147,7 +148,7 @@ Rowstore indexes perform best on queries that seek into the data, when searching
147148

148149
Columnstore indexes give high performance gains for analytic queries that scan large amounts of data, especially on large tables. Use columnstore indexes on data warehousing and analytics workloads, especially on fact tables, because they tend to require full table scans rather than table seeks.
149150

150-
Ordered clustered columnstore indexes improve performance for queries based on ordered column predicates. Ordered columnstore indexes can improve row-group elimination, which can deliver performance improvements by skipping row groups altogether. For more information, see [Performance tuning with ordered clustered columnstore indexes](ordered-columnstore-indexes.md). For ordered columnstore index availability, see [Ordered column index availability](columnstore-indexes-overview.md#ordered-columnstore-index-availability).
151+
Ordered clustered columnstore indexes improve performance for queries based on ordered column predicates. Ordered columnstore indexes can improve row-group elimination, which can deliver performance improvements by skipping row groups altogether. For more information, see [Performance tuning with ordered columnstore indexes](ordered-columnstore-indexes.md). For ordered columnstore index availability, see [Ordered column index availability](columnstore-indexes-overview.md#ordered-columnstore-index-availability).
151152

152153
### Can I combine rowstore and columnstore on the same table?
153154

@@ -157,9 +158,9 @@ Beginning with [!INCLUDE [sssql16-md](../../includes/sssql16-md.md)], you can ha
157158

158159
## Ordered columnstore indexes
159160

160-
By enabling efficient segment elimination, ordered clustered columnstore indexes (CCI) provide much faster performance by skipping large amounts of ordered data that don't match the query predicate. Loading data into an ordered CCI table can take longer than a non-ordered CCI table because of the data sorting operation, however queries can run faster afterwards with ordered CCI.
161+
By enabling efficient segment elimination, ordered columnstore indexes provide faster performance by skipping large amounts of ordered data that don't match the query predicate. Loading data into an ordered columnstore index can take longer than in a non-ordered index because of the data sorting operation, however with ordered columnstore indexes queries can run faster afterwards.
161162

162-
- For more information on performance tuning data warehousing workloads in the SQL Database Engine with ordered clustered columnstore indexes, see [Performance tuning with ordered clustered columnstore indexes](ordered-columnstore-indexes.md).
163+
- For more information on performance tuning data warehousing workloads in the SQL Database Engine with ordered columnstore indexes, see [Performance tuning with ordered columnstore indexes](ordered-columnstore-indexes.md).
163164
- For more information on when to use which type of columnstore index, see [Choose the best columnstore index for your needs](columnstore-indexes-design-guidance.md#choose-the-best-columnstore-index-for-your-needs).
164165

165166
### Ordered columnstore index availability
@@ -168,10 +169,10 @@ First introduced with [!INCLUDE [_ss2022](../../includes/applies-to-version/_ss2
168169

169170
|Platform|Ordered *clustered* columnstore indexes|Ordered *nonclustered* columnstore indexes|
170171
|:--|:--|:--|
171-
|[!INCLUDE [ssazure-sqldb](../../includes/ssazure-sqldb.md)] | Yes | Yes |
172+
|[!INCLUDE [ssazure-sqldb-sqlmi-versionless](../../includes/ssazure-sqldb-sqlmi-versionless.md)] | Yes | Yes |
172173
|[!INCLUDE [fabric-sqldb](../../includes/fabric-sqldb.md)] | Yes\* | Yes |
173174
|[!INCLUDE [sssql22-md](../../includes/sssql22-md.md)]|Yes|No|
174-
|[!INCLUDE [ssazuremi-md](../../includes/ssazuremi-md.md)]|Yes|Yes|
175+
|[!INCLUDE [ssazuremi-md](../../includes/ssazuremi-md.md)]|Yes|No|
175176
|[!INCLUDE [sss-dedicated-pool-md](../../includes/sss-dedicated-pool-md.md)] in [!INCLUDE [ssazuresynapse-md](../../includes/ssazuresynapse-md.md)]|[Yes](/azure/synapse-analytics/sql-data-warehouse/performance-tuning-ordered-cci)|No|
176177

177178
\* In Fabric SQL database, tables with clustered columnstore indexes are not [mirrored to Fabric OneLake](/fabric/database/sql/mirroring-overview).

docs/relational-databases/indexes/columnstore-indexes-query-performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ Segment elimination does not apply to LOB data types, such as the (max) data typ
180180

181181
Currently, only [!INCLUDE [sssql22-md](../../includes/sssql22-md.md)] and later supports clustered columnstore rowgroup elimination for the prefix of `LIKE` predicates, for example `column LIKE 'string%'`. Segment elimination is not supported for non-prefix use of `LIKE`, such as `column LIKE '%string'`.
182182

183-
[Ordered clustered columnstore indexes](columnstore-indexes-overview.md#ordered-columnstore-indexes) also benefit from segment elimination, especially for string columns. In ordered clustered columnstore indexes, segment elimination on the first column in the index key is most effective, because it is sorted. Performance gains due to segment elimination on other columns in the table will be less predictable. For more on ordered clustered columnstore indexes, see [Use an ordered clustered columnstore index for large data warehouse tables](columnstore-indexes-design-guidance.md#use-an-ordered-clustered-columnstore-index-for-large-data-warehouse-tables). For ordered columnstore index availability, see [Ordered column index availability](columnstore-indexes-overview.md#ordered-columnstore-index-availability).
183+
[Ordered columnstore indexes](columnstore-indexes-overview.md#ordered-columnstore-indexes) also benefit from segment elimination, especially for string columns. In ordered columnstore indexes, segment elimination on the first column in the index key is most effective, because it is sorted. Performance gains due to segment elimination on other columns in the table is less predictable. For more on ordered columnstore indexes, see [Use an ordered columnstore index for large data warehouse tables](columnstore-indexes-design-guidance.md#use-an-ordered-columnstore-index-for-large-data-warehouse-tables). For ordered columnstore index availability, see [Ordered column index availability](columnstore-indexes-overview.md#ordered-columnstore-index-availability).
184184

185185
Using the query connection option [SET STATISTICS IO](../../t-sql/statements/set-statistics-io-transact-sql.md), you can view segment elimination in action. Look for output such as the following to indicate that segment elimination has occurred. Row groups are made up of column segments, so this might indicate segment elimination. The following `SET STATISTICS IO` output example of a query, roughly 83% data was skipped by the query:
186186

0 commit comments

Comments
 (0)