Reorganizing All Indexes of One Table with SADPBA
Use
You can use SAPDBA for Informix to reorganize all the indexes of one table. SAPDBA rebuilds the indexes using the parameters that you specify.
Prerequisites
Procedure
SAPDBA displays a set of parameters specifying the reorganization.
This parameter specifies the fill level of the indexes when reorganized. Set it as follows:
- If the underlying table is dynamic (that is, a lot of new data is being added) specify a low fill factor.
- If the underlying table is static (that is, little new data is being added) specify a high fill factor.
The value initially displayed is a default which you can find in the ONCONFIG file:
FILLFACTOR 90 # Fill factor for building indexes
You can use SAPDBA to view the
ONCONFIG file. Refer to Listing System Information with SAPDBA. The file is called onconfig.<hostname>.<sid> and you can find it in the directory $INFORMIXDIR/etc .This parameter specifies whether the reorganized indexes remain in the same dbspace. You can enter a new dbspace if you want to detach the indexes and store them in a separate dbspace.

To reorganize the indexes, SAPDBA needs to lock them. Therefore, it is best to reorganize when the R/3 System is down, to avoid performance problems. You might also experience unpredictable results if the indexes you are trying to reorganize are locked by another process.
SAPDBA reorganizes the indexes.

You might see
Result
After an index reorganization, your database is less likely to run into space problems. However, you need to keep on monitoring the index, especially if the underlying table is growing rapidly. Refer to
Storage Analysis of Tables and Indexes with SAPDBA.
You need to periodically clear up the
See also:
Informix documentation