REINDEX

Function

REINDEX rebuilds an index using the data stored in the index's table, replacing the old copy of the index.

There are several scenarios in which REINDEX can be used:

Precautions

Index reconstruction of the REINDEX DATABASE or SYSTEM type cannot be performed in transaction blocks.

Syntax

Parameter Description

Index reconstruction of the REINDEX DATABASE or SYSTEM type cannot be performed in transaction blocks.

Examples

Rebuild a single index.

1
REINDEX INDEX tpcds.tpcds_customer_index1;

Rebuild all indexes on the tpcds.customer_t1 table.

1
REINDEX TABLE tpcds.customer_t1;