0% found this document useful (0 votes)
158 views1 page

Rebuilding Indexes: Alter Index Rebuild

Rebuilding indexes periodically, such as after large data changes, can improve performance. The SQL "ALTER INDEX <index_name> REBUILD" rebuilds the index. Adding "UNRECOVERABLE" speeds it up by avoiding redo logs. When rebuilding in Oracle 7.3, specify a tablespace to control where the index is rebuilt.

Uploaded by

Srinivas Surabhi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
158 views1 page

Rebuilding Indexes: Alter Index Rebuild

Rebuilding indexes periodically, such as after large data changes, can improve performance. The SQL "ALTER INDEX <index_name> REBUILD" rebuilds the index. Adding "UNRECOVERABLE" speeds it up by avoiding redo logs. When rebuilding in Oracle 7.3, specify a tablespace to control where the index is rebuilt.

Uploaded by

Srinivas Surabhi
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Rebuilding indexes

Periodically, and typically after large deletes or inserts, it is worth rebuilding indexes. The SQL for this is:
Alter index <index_name> rebuild;

Alternatively, the following performs the same, but avoids writing to the redo logs and thus speeds up the index rebuild:
Alter index <index_name> rebuild unrecoverable;

Note: If performing this under Oracle 7.3 then be sure to specify the destination tablespace, ie:
Alter index <index_name> rebuild tablespace <tablespace>;

Otherwise the index will be moved to the temporary tablespace.

This page represents one page of many pages of notes I made whilst working with Oracle 7 through to 10i. I now no longer work with Oracle databases, but hope that these notes will continue to be of benefit to others.

You might also like