Specifying the access path maintenance (MAINT) parameter
The MAINT parameter specifies the type of access path maintenance for all members of a database file.
If a file member is open, the system maintains the access path for the member when changes are made to the data in it. However, because more than one access path might exist for the same data, changing data in one file member might cause changes in the access paths for other file members that are not open (in use).
Here are the ways you can maintain access paths for all members of a database file:
- Immediate maintenance of an access path means that the access path is maintained for a file member whenever changes are made to its associated data, whether the member is open or not. Access paths used by referential constraints are always in immediate maintenance.
- Rebuild maintenance of an access path means that the access path is maintained for a file member only when the member is open, not when the member is closed; the access path is rebuilt when the member is opened the next time. When a file member with rebuild maintenance is closed, the system stops maintaining the access path. When the file member is opened again, the access path is totally rebuilt. If one or more programs have opened a specific file member with rebuild maintenance specified, the system maintains the access path for the member until the last user closes it.
- Delayed maintenance of an access path means that any maintenance of the access path is done after the file member is opened the next time and when it remains open. However, the access path is not rebuilt as it is with rebuild maintenance. Changes to the access path are collected from the time the member is closed until it is opened again. When it is opened, only the collected changes are merged into the access path.
If you do not specify the type of maintenance for a file, the default is immediate maintenance.
- MAINT parameter comparison
This table compares the effect of the immediate, rebuild, and delayed maintenance of access paths on opening and processing files.
- MAINT parameter tips
The type of access path maintenance to specify depends on the number of records and the frequency of add, delete, or update operations on the file when it is closed.
Parent topic:
Specifying database file and member attributes