Specifying the current access path maintenance (MAINT) parameter when creating database files

The MAINT parameter specifies how access paths are maintained for closed files. While a file is open, the system maintains the access paths as changes are made to the data in the file. However, because more than one access path can exist for the same data, changing data in one file might cause changes to be made in access paths for other files that are not currently open (in use). The three ways of maintaining access paths of closed files are:

If you do not specify the type of maintenance for a file, the default is immediate maintenance.

MAINT Parameter Comparison

Table 1 compares immediate, rebuild, and delayed maintenance as they affect opening and processing files.

Table 1. MAINT Values
Function Immediate Maintenance Rebuild Maintenance Delayed Maintenance
Open Fast open because the access path is current. Slow open because access path must be rebuilt. Moderately fast open because the access path does not have to be rebuilt, but it must still be changed. Slow open if extensive changes are needed.
Process Slower update/output operations when many access paths with immediate maintenance are built over changing data (the system must maintain the access paths). Faster update/output operations when many access paths with rebuild maintenance are built over changing data and are not open (the system does not have to maintain the access paths). Moderately fast update/output operations when many access paths with delayed maintenance are built over changing data and are not open, (the system records the changes, but the access path itself is not maintained).
Note:
  1. Delayed or rebuild maintenance cannot be specified for a file that has unique keys.
  2. Rebuild maintenance cannot be specified for a file if its access path is being journaled.

MAINT Parameter Tips

The type of access path maintenance to specify depends on the number of records and the frequency of additions, deletions, and updates to a file while the file is closed.

You should use delayed maintenance for files that have relatively few changes to the access path while the file members are closed. Delayed maintenance reduces system overhead by reducing the number of access paths that are maintained immediately. It may also result in faster open processing, because the access paths do not have to be rebuilt.

You may want to specify immediate maintenance for access paths that are used frequently, or when you cannot wait for an access path to be rebuilt when the file is opened. You may want to specify delayed maintenance for access paths that are not used frequently, if infrequent changes are made to the record keys that make up the access path.

In general, for files used interactively, immediate maintenance results in good response time. For files used in batch jobs, either immediate, delayed, or rebuild maintenance is adequate, depending on the size of the members and the frequency of changes.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]