The ALTER INDEX 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
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.When an ALTER INDEX statement is executed with DISABLE, the index cannot be used for this search but is still modified with the INSERT, UPDATE, or DELETE statements.
If an ALTER INDEX statement is executed with ENABLE, the index can be used again for the search.