Skip to content

Commit c2a4dd2

Browse files
authored
Merge pull request #10453 from julieMSFT/20190530_OCCI
20190530 OCCI T-SQL
2 parents a26e677 + 141da39 commit c2a4dd2

3 files changed

Lines changed: 8 additions & 7 deletions

File tree

docs/t-sql/statements/alter-index-transact-sql.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ To rebuild a clustered columnstore index, [!INCLUDE[ssNoVersion](../../includes/
659659

660660
1. Requires space on the physical media to store two copies of the columnstore index while the rebuild is taking place. When the rebuild is finished, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] deletes the original clustered columnstore index.
661661

662-
1. For an Azure SQL Data Warehouse table with an ordered clustered columnstore index, ALTER INDEX REBUILD will re-sort the data.
662+
1. For an Azure SQL Data Warehouse table with an ordered clustered columnstore index, ALTER INDEX REBUILD will re-sort the data. Monitor tempdb during rebuild operations. If you need more tempdb space, you can scale up the data warehouse. Scale back down once the index rebuild is complete.
663663

664664
## <a name="reorganizing-indexes"></a> Reorganizing Indexes
665665
Reorganizing an index uses minimal system resources. It defragments the leaf level of clustered and nonclustered indexes on tables and views by physically reordering the leaf-level pages to match the logical, left to right, order of the leaf nodes. Reorganizing also compacts the index pages. Compaction is based on the existing fill factor value. To view the fill factor setting, use [sys.indexes](../../relational-databases/system-catalog-views/sys-indexes-transact-sql.md).

docs/t-sql/statements/create-columnstore-index-transact-sql.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,9 @@ CREATE [NONCLUSTERED] COLUMNSTORE INDEX index_name
100100
```
101101
-- Syntax for Azure SQL Data Warehouse and Parallel Data Warehouse
102102
103-
CREATE CLUSTERED COLUMNSTORE INDEX index_name
104-
ON { database_name.schema_name.table_name | schema_name.table_name | table_name }
103+
CREATE CLUSTERED COLUMNSTORE INDEX index_name
104+
ON { database_name.schema_name.table_name | schema_name.table_name | table_name }
105+
[ORDER (column [,...n] ) ]
105106
[ WITH ( DROP_EXISTING = { ON | OFF } ) ] --default is OFF
106107
[;]
107108
```
@@ -747,7 +748,7 @@ DROP INDEX cci_xdimProduct ON xdimProduct;
747748

748749
Create an ordered clustered columnstore index ordered on SHIPDATE.
749750

750-
```sql
751+
```sql
751752
CREATE CLUSTERED COLUMNSTORE INDEX cci ON Sales.OrderLines
752753
ORDER ( SHIPDATE );
753754
```

docs/t-sql/statements/create-table-azure-sql-data-warehouse.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ To understand tables and how to use them, see [Tables in SQL Data Warehouse](htt
3030

3131
## Syntax
3232

33-
```
33+
```
3434
-- Create a new table.
3535
CREATE TABLE { database_name.schema_name.table_name | schema_name.table_name | table_name }
3636
(
@@ -165,12 +165,12 @@ Creates one or more table partitions. These partitions are horizontal table slic
165165

166166
### Ordered Clustered columnstore index option (Preview)
167167

168-
Clustered columnstore index is the default for creating tables in Azure SQL Data Warehouse. The ORDER specification defaults to COMPOUND keys. Sorting will always be ascending order. If no ORDER clause is specified, columnstore will not be sorted.
168+
Clustered columnstore index is the default for creating tables in Azure SQL Data Warehouse. The ORDER specification defaults to COMPOUND keys. Sorting will always be ascending order. If no ORDER clause is specified, columnstore will not be sorted. Due to the ordering process, a table with ordered clustered columnstore index may experience longer data loading times than non-ordered clustered columnstore indexes. If you need more tempdb space while loading data, you can decrease the amount of data per insert.
169169

170170
During preview, you can run this query to check the column(s) with ORDER enabled. A catalog view will be provided later to provide this information and the column ordinal if multiple columns are specified in ORDER.
171171

172172
```sql
173-
SELECT o.name, c.name, s.min_data_id, s.max_data_id, s.max_data_id-s.min_data_id as difference,  s.*
173+
SELECT o.name, c.name, s.min_data_id, s.max_data_id, s.max_data_id-s.min_data_id as difference,  s.*
174174
FROM sys.objects o
175175
INNER JOIN sys.columns c ON o.object_id = c.object_id
176176
INNER JOIN sys.partitions p ON o.object_id = p.object_id

0 commit comments

Comments
 (0)