There are three types of access path maintenance options: immediate (IMMED), delay (DLY), and rebuild (REBLD). These options determine how the operating system applies changes to the access paths. While a file is open, the system maintains the access paths as changes are made to the data in the file. However, when the file is closed, the access path maintenance option specifies to i OS how the access path should be maintained. It is important to pay close attention to access paths in the design stage.
The use of maintenance options applies only to RSQ and SPN access paths. The UPD and RTV access paths are defined with a UNIQUE key; as a result, maintenance has to be IMMED. For QRY access paths, maintenance does not apply because the access path is rebuilt at execution.
There are considerations with each type of maintenance option. When you change a file, indexes with IMMED maintenance are updated. However, when programs that open DLY and REBLD maintenance access paths are invoked, changes are applied that then make the programs slower to load.
Use DLY maintenance with caution. If more than approximately 10% of the number of entries in the access path are changed, the whole index will be rebuilt at the next open. This rebuild could occur during the use of a program that does not use that index.
If the file records are non-volatile, you can always take the default IMMED maintenance. If the data is likely to change for infrequently used access paths, you may use DLY or REBLD maintenance. However, keep in mind that for each different type of maintenance, you will get a separate active index. Specify a REBLD access path if you already have an IMMED maintenance access path with the same set of keys and select/omit sets.
The following is a comparison of IMMED, DLY, and REBLD maintenance as they affect opening and processing files:
Immediate |
Delay |
Rebuild |
Fast open because the access path is current. |
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. |
Slow open because access path must be rebuilt. |
Slower update/output operations when many access paths with immediate maintenance are built over changing data (the system must 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). |
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). |
For more information:
Copyright © 2014 CA.
All rights reserved.
|
|