DB2 10.5 for Linux, UNIX, and Windows

Data organization

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:

  1. Determine whether you need to reorganize any tables or indexes.
  2. Choose a reorganization method.
  3. Perform the reorganization of identified objects.
  4. Optional: Monitor the progress of reorganization.
  5. 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.
  6. Collect statistics on reorganized objects.
  7. Rebind applications that access reorganized objects.