ALTER INDEX REBUILD

Rebuilds the index of a specific column. 

Syntax

ALTER INDEX REBUILD ON [schema.]table.column

Description

Used for recovery purposes. The action is non atomic, and if it is interrupted the index will be corrupted. Therefore, it is strongly recommended to stop the maint and schedualer services on all hosts, before executing this command, and start them back only after it is done. Also, do not load anything to that table until the execution is finished.

Example

ALTER INDEX REBUILD ON store_sales.ss_item_sk;