REINDEX
Recreate indexes from scratch
Synopsis:
REINDEX collation-name | ( [database-name .] table-name | index-name )
Description:
The REINDEX command deletes and recreates indexes from scratch. This is useful when the definition of a collation sequence has changed.
The scope of the affected database indexes depends on the type of database object given to the command, as summarized in the following behavioral rules:
- If you specify the collation-name parameter, all the indexes in any attached databases that use the specified collation sequence are recreated.
- If you specify a database-name.table-name combination, all indexes associated with the table are rebuilt.
- If you specify a database-name.index-name combination, only this specified index is deleted and recreated.
- If you don't specify the database-name parameter but there exists both a collation sequence and either a table or index with the specified name, only the indexes associated with the collation sequence are recreated. You can avoid this ambiguity by always specifying the database-name parameter when reindexing a table or index.
Page updated:
