You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Aggregate Pushdown for efficient processing of aggregates. This is supported on all database compatibility levels.
31
31
- String predicate pushdown for efficient processing of string predicates. This is supported on all database compatibility levels.
32
32
- 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).
34
34
35
35
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).
|[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 |
46
46
|[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.|
47
47
|[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.|
48
48
|[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:
66
66
67
67
For more information, see [Columnstore indexes in data warehousing](columnstore-indexes-data-warehouse.md).
68
68
69
-
## Use an ordered clustered columnstore index for large data warehouse tables
69
+
## Use an ordered columnstore index for large data warehouse tables
70
70
71
71
For ordered columnstore index availability, see [Columnstore indexes: Overview](columnstore-indexes-overview.md#ordered-columnstore-index-availability).
72
72
73
-
Consider using an ordered clustered columnstore index in the following scenarios:
73
+
Consider using an ordered columnstore index in the following scenarios:
74
74
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).
80
80
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:
82
82
83
83
- 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`.
85
85
86
86
## Add B-tree nonclustered indexes for efficient table seeks
description: "An overview on columnstore indexes. Columnstore indexes are the standard for storing and querying large data warehousing fact tables."
4
4
author: MikeRayMSFT
5
5
ms.author: mikeray
6
-
ms.date: 11/01/2024
6
+
ms.reviewer: dfurman
7
+
ms.date: 02/28/2025
7
8
ms.service: sql
8
9
ms.subservice: table-view-index
9
10
ms.topic: conceptual
@@ -147,7 +148,7 @@ Rowstore indexes perform best on queries that seek into the data, when searching
147
148
148
149
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.
149
150
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).
151
152
152
153
### Can I combine rowstore and columnstore on the same table?
153
154
@@ -157,9 +158,9 @@ Beginning with [!INCLUDE [sssql16-md](../../includes/sssql16-md.md)], you can ha
157
158
158
159
## Ordered columnstore indexes
159
160
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.
161
162
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).
163
164
- 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).
164
165
165
166
### Ordered columnstore index availability
@@ -168,10 +169,10 @@ First introduced with [!INCLUDE [_ss2022](../../includes/applies-to-version/_ss2
|[!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|
176
177
177
178
\* In Fabric SQL database, tables with clustered columnstore indexes are not [mirrored to Fabric OneLake](/fabric/database/sql/mirroring-overview).
Copy file name to clipboardExpand all lines: docs/relational-databases/indexes/columnstore-indexes-query-performance.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -180,7 +180,7 @@ Segment elimination does not apply to LOB data types, such as the (max) data typ
180
180
181
181
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'`.
182
182
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).
184
184
185
185
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:
0 commit comments