How to rebuild an Oracle index and the advantage of rebuilding an index?
Sample Examples of SQL statement to rebuild an index.
meda Changed status to publish 16/07/2022
We rebuild an index either to make corrupted or unused index usable again or to change the tablespaces of the index for storage performance purposes.
We use the REBUILD clause for rebuilding an index:
SQL> ALTER INDEX <indexname> REBUILD;
OR
SQL> ALTER INDEX <indexname> REBUILD TABLESPACE <new-tablespace-name>;
meda Edited answer 21/02/2022