Skip to content

Commit c1118a9

Browse files
Adding changes required for online rebuild
1 parent ac678d8 commit c1118a9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,15 +179,15 @@ Use the example in [sys.dm_db_column_store_row_group_physical_stats (Transac
179179
180180
![Combined rowgroups](../../relational-databases/indexes/media/cci-compressed-rowgroups.png "Combined rowgroups")
181181
182-
## <a name="rebuild"></a> Use ALTER INDEX REBUILD to defragment the columnstore index offline
182+
## <a name="rebuild"></a> Use ALTER INDEX REBUILD to defragment the columnstore index
183183
For [!INCLUDE[ssSQL15](../../includes/sssql15-md.md)] and later, rebuilding the columnstore index is usually not needed since `REORGANIZE` performs the essentials of a rebuild in the background as an online operation.
184184
185-
Rebuilding a columnstore index removes fragmentation, and moves all rows into the columnstore. Use [CREATE COLUMNSTORE INDEX &#40;Transact-SQL&#41;](../../t-sql/statements/create-columnstore-index-transact-sql.md) or [ALTER INDEX &#40;Transact-SQL&#41;](../../t-sql/statements/alter-index-transact-sql.md) to perform a full rebuild of an existing clustered columnstore index. Additionally, you can use ALTER INDEX … REBUILD to rebuild a specific partition.
185+
Rebuilding a columnstore index removes fragmentation, moves all rows into the columnstore, and re-creates internal dictionary structures that contain compressed textual information. Use [CREATE COLUMNSTORE INDEX &#40;Transact-SQL&#41;](../../t-sql/statements/create-columnstore-index-transact-sql.md) or [ALTER INDEX &#40;Transact-SQL&#41;](../../t-sql/statements/alter-index-transact-sql.md) to perform a full rebuild of an existing clustered columnstore index. Additionally, you can use ALTER INDEX … REBUILD to rebuild a specific partition.
186186
187187
### Rebuild Process
188188
To rebuild a columnstore index, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)]:
189189
190-
1. Acquires an exclusive lock on the table or partition while the rebuild occurs. The data is “offline” and unavailable during the rebuild, even when using `NOLOCK`, RCSI, or SI.
190+
1. Acquires an exclusive lock on the table or partition while the rebuild occurs. The data is “offline” and unavailable during the rebuild, even when using `NOLOCK`, RCSI, or SI, unless if you explicitly specify `ONLINE=ON` option (currently in public preview in Azure SQL Database).
191191
192192
2. Re-compresses all data into the columnstore. Two copies of the columnstore index exist while the rebuild is taking place. When the rebuild is finished, [!INCLUDE[ssNoVersion](../../includes/ssnoversion-md.md)] deletes the original columnstore index.
193193

0 commit comments

Comments
 (0)