Consultor Eletrônico



Kbase P10147: Can PROUTIL IDXCOMPACT automatically compact indexes for a Storage Area?
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   3/3/2008
Status: Verified

GOAL:

Can PROUTIL IDXCOMPACT be used for all the indexes of a table?

GOAL:

Can PROUTIL IDXCOMPACT automatically compact all indexes for a given Storage Area?

FIX:

No, IDXCOMPACT can only be run for one index at a time.

proutil dbname -C idxcompact [owner-name.]table-name.index-name [n]

The IDXCOMPACT option with PROUTIL requires that a table and index name be specified when the command is issued. A wildcard value does not exist to have IDXCOMPACT automatically detect and compact all indexes in a defined Storage Area.

The following code can be used to create a a file that contains the proutil idxcompact command for all tables and indexes in your database. Once this program is executed, a file called index.list will be created in your working directory. This file can then be executed to compact indexes for all tables and indexes in your database . Because we are not specifying a compaction value on the command line, the compaction will be the default compaction value of 80%.

Modify the code below to replace dbname with the name of your database.

OUTPUT TO index.list.
FOR EACH _file WHERE _file-number > 0:
FOR EACH _index OF _file:
PUT UNFORMATTED "proutil dbname -C idxcompact " + _file-name + "." + _index-name SKIP.
END.
END.