Rebuilds one or more index columns of the given table. This operation is intended to be used after a hardware or software crash, when the index data are corrupted and the table cannot be opened for writes.
The operation can only be performed when there is no other reader and writer working on the table. During the operation, the table is locked and no read and write should be performed on the selected table.
REINDEX rebuilds all indexes in the selected table. The following
options can be used to narrow down the scope of the operation:
COLUMN: When defined,
REINDEXrebuilds the index for the selected column.
PARTITION: When defined,
REINDEXrebuilds index files in the selected partition only. The partition name must match the name of the directory for the given partition. The naming convention is detailed in Partitions.
Rebuilding all the indexes in the table
Rebuilding the index in the column
Rebuilding one partition (
2021-12-17) of the index in the column