Previous Topic: Rebuilding an Index AreaNext Topic: Successful Execution Requirements and Controls


When to Use

Use the RETIX function to rebuild an Index Area when you have added a new key definition to a table. If you redefine an existing key, making it longer or shorter, you must first remove it from the Index Area (IXX). See REMOVE (Remove Key ID) for details. Then, rebuild the Index Area using the RETIX function.

Note: When CA Datacom/DB encounters a duplicate value for a Unique Key or a Master Key that has been defined as allowing no duplicates (this can happen if the table is loaded with LOADDUPS=YES specified), CA Datacom/DB produces a snap dump of the duplicate. See the section on using dumps in the CA Datacom/DB Database and System Administration Guide for a sample.

After key definition changes, users normally execute the DBUTLTY RETIX function to rebuild the index for affected areas or the entire database. With MINIMAL=NO (the default), RETIX reads the data area in physical sequence, extracted current key definitions, and merges them into the index in a process that also deleted any unnecessary index entries. With MINIMAL=YES, you can restrict RETIX to only performing the minimal actions necessary.

The use of MINIMAL=YES is allowed at the area level only, not the database level. The AREA= keyword is therefore also required. The use of MINIMAL=YES usually reduces the number of I/O events, reduces the amount of CPU used, and reduces the elapsed time of the RETIX, compared to not using MINIMAL=YES. The savings are larger for areas with more records, compared to areas with fewer records. Areas with no records or few records might see a small saving or a small increase. A MINIMAL=YES RETIX cannot run after the INIT of the IXX. It can run after the INIT of a Multi-Dataset Index other than the IXX, such as I2. Using MINIMAL= requires that the tables in the area all have their URI index set to loaded. The CXX REPORT must therefore not have an INDEX LOADED status of NO.