ALTER INDEX Statement (alter_index_statement)
The ALTER INDEX (
alter_index_statement) statement determines how an index is used in data queries.Syntax
<alter_index_statement> ::= ALTER INDEX <index_name> [ON <table_name>] ENABLE
| ALTER INDEX <index_name> [ON <table_name>] DISABLE
| ALTER INDEX <index_name> [ON <table_name>] INIT USAGE
Explanation
When a
CREATE INDEX statement is executed, an index is generated across the specified columns. This index is modified accordingly for all of the following SQL statements for data manipulation (INSERT statement, UPDATE statement, DELETE statement). With all other SQL statements in which individual rows in a table are specified, the database system can use this index to speed up the search for these rows.ALTER INDEX … DISABLE
The index can no longer be used for this search, however it continues to be changed by the use of the SQL statements INSERT, UPDATE, or DELETE.
ALTER INDEX … ENABLE
The index can be used for the search again.
ALTER INDEX … INIT USAGE
The column INDEX_USED in the system table
DOMAIN.INDEXES is initialized with 0; that is, the count of how often an index is used is restarted.