Skip to content

Commit d8710dd

Browse files
authored
Merge pull request #94714 from XiaoyuMSFT/xyz
updates
2 parents e776877 + 117396c commit d8710dd

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

articles/sql-data-warehouse/performance-tuning-ordered-cci.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ORDER BY o.name, pnp.distribution_id, cls.min_data_id
3838
```
3939

4040
> [!NOTE]
41-
> In an ordered CCI table, new data resulting from DML or data loading operations are not automatically sorted. Users can REBUILD the ordered CCI to sort all data in the table. In Azure SQL Data Warehouse, the columnstore index REBUILD is an offline operation. For a partitioned table, the REBUILD is done one partition at a time. Data in the partition that is being rebuilt is "offline" and unavailable until the REBUILD is complete for that partition.
41+
> In an ordered CCI table, the new data resulting from the same batch of DML or data loading operations are sorted within that batch, there is no global sorting across all data in the table. Users can REBUILD the ordered CCI to sort all data in the table. In Azure SQL Data Warehouse, the columnstore index REBUILD is an offline operation. For a partitioned table, the REBUILD is done one partition at a time. Data in the partition that is being rebuilt is "offline" and unavailable until the REBUILD is complete for that partition.
4242
4343
## Query performance
4444

@@ -58,7 +58,7 @@ ORDER (Col_C, Col_B, Col_A)
5858

5959
```
6060

61-
The performance of query 1 can benefit more from ordered CCI than the other 3 queries.
61+
The performance of query 1 can benefit more from ordered CCI than the other three queries.
6262

6363
```sql
6464
-- Query #1:
@@ -95,7 +95,7 @@ Here is an example query performance comparison between CCI and ordered CCI.
9595

9696
The number of overlapping segments depends on the size of data to sort, the available memory, and the maximum degree of parallelism (MAXDOP) setting during ordered CCI creation. Below are options to reduce segment overlapping when creating ordered CCI.
9797

98-
- Use xlargerc resource class on a higher DWU to allow more memory for data sorting before the index builder compresses the data into segments. Once in an index segment, the physical location of the data cannot be changed. There is no data sorting within a segment or across segments.
98+
- Use xlargerc resource class on a higher DWU to allow more memory for data sorting before the index builder compresses the data into segments. Once in an index segment, the physical location of the data cannot be changed. There's no data sorting within a segment or across segments.
9999

100100
- Create ordered CCI with MAXDOP = 1. Each thread used for ordered CCI creation works on a subset of data and sorts it locally. There's no global sorting across data sorted by different threads. Using parallel threads can reduce the time to create an ordered CCI but will generate more overlapping segments than using a single thread. Currently, the MAXDOP option is only supported in creating an ordered CCI table using CREATE TABLE AS SELECT command. Creating an ordered CCI via CREATE INDEX or CREATE TABLE commands does not support the MAXDOP option. For example,
101101

@@ -107,12 +107,12 @@ OPTION (MAXDOP 1);
107107
- Pre-sort the data by the sort key(s) before loading them into Azure SQL Data Warehouse tables.
108108

109109

110-
Here is an example of an ordered CCI table distribution that has zero segment overlapping following above recommendations. The ordered CCI table is created in a DWU1000c database via CTAS from a 20GB heap table using MAXDOP 1 and xlargerc. The CCI is ordered on a BIGINT column with no duplicates.
110+
Here is an example of an ordered CCI table distribution that has zero segment overlapping following above recommendations. The ordered CCI table is created in a DWU1000c database via CTAS from a 20-GB heap table using MAXDOP 1 and xlargerc. The CCI is ordered on a BIGINT column with no duplicates.
111111

112112
![Segment_No_Overlapping](media/performance-tuning-ordered-cci/perfect-sorting-example.png)
113113

114114
## Create ordered CCI on large tables
115-
Creating an ordered CCI is an offline operation. For tables with no partitions, the data won't be accessible to users until the ordered CCI creation process completes. For partitioned tables,since the engine creates the ordered CCI partition by partition, users can still access the data in partitions where ordered CCI creation isn't in process. You can use this option to minimize the downtime during ordered CCI creation on large tables:
115+
Creating an ordered CCI is an offline operation. For tables with no partitions, the data won't be accessible to users until the ordered CCI creation process completes. For partitioned tables, since the engine creates the ordered CCI partition by partition, users can still access the data in partitions where ordered CCI creation isn't in process. You can use this option to minimize the downtime during ordered CCI creation on large tables:
116116

117117
1. Create partitions on the target large table (called Table_A).
118118
2. Create an empty ordered CCI table (called Table_B) with the same table and partition schema as Table A.

0 commit comments

Comments
 (0)