Over time, data in your tables can become fragmented, increasing
the size of tables and indexes as records become distributed over
more and more data pages. This can increase the number of pages that
need to be read during query execution. Reorganization of tables and
indexes compacts your data, reclaiming wasted space and improving
data access.
Procedure
The steps to perform an index or table reorganization
are as follows:
- Determine whether you need to reorganize any tables or
indexes.
- Choose a reorganization method.
- Perform the reorganization of identified objects.
- Optional: Monitor the progress of reorganization.
- Determine whether or not the reorganization was successful. For offline table reorganization and any index reorganization,
the operation is synchronous, and the outcome is apparent upon completion
of the operation. For online table reorganization, the operation is
asynchronous, and details are available from the history file.
- Collect statistics on reorganized objects.
- Rebind applications that access reorganized objects.