Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Rebuilding Indexes: Alter Index Rebuild

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 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