Reorganization of a Group of Tables or Dbspace with SAPDBA
Purpose
You can use SAPDBA for Informix to reorganize a group of tables or a dbspace (including all tables in the dbspace).
Prerequisites
Process Flow
· Tables in Dbspace by ‘alter fragment...’ and Tables Listed in File by ‘alter fragment...’
The "alter fragment" method is the fastest. However, SAPDBA does not alter the storage parameters (although some tables that were scattered might end up with fewer extents) and the table statistics are not updated. This is best if you want to move tables to another dbspace.
Refer to
Reorganizing a Group of Tables with SAPDBA.· Tables in Dbspace by 'insert into select from …' and Tables Listed in File by 'insert into select from …'
The "insert into select from" method tunes the storage parameters for each table optimally, so this is best if you want to reclaim space.
Refer to
Reorganizing a Group of Tables with SAPDBA.· Reorganize Dbspace
This uses the "alter fragment" or the "insert into select from" method, depending on the phase of the reorganization and the Informix version that you are using. This method is normally a good compromise. For more information, see
Reorganizing a Dbspace and Its Tables with SAPDBA.If you use the "tables in dbspace" methods, then SAPDBA reorganizes all the tables of the dbspace. If you use the "tables listed in file" methods, then SAPDBA uses a file containing a list of dbspaces and other parameters. You must set up the file yourself before the reorganization.

If there are problems, you
Result
After a reorganization, your database is less likely to run into space problems. However, you need to keep on monitoring the space situation. Refer to
Storage Analysis of Tables and Indexes with SAPDBA.
See also:
Informix documentation