When rebuilding a CA-IDMS system-owned index, is it more efficient to run the MAINTAIN INDEX utility statement with the REBUILD FROM INDEX or REBUILD FROM MEMBERS clause?
There are a three aspects to consider when addressing this question:
1- First, is this a mandatory automatic (MA) index? Or does it have some other membership option specified?
2- Second, is the integrity of the index intact? i.e., are there any broken chains in the index?
3- Third, is this index defined on a network database, or an SQL index?
CASE 1: An intact system-owned MA network index
If this is a system-owned MA index defined on a network database and the integrity of an index is intact, then it is always more efficient to run the MAINTAIN INDEX utility as a REBUILD FROM INDEX rather than REBUILD FROM MEMBERS or REBUILD FROM ALLROWS. When performing a REBUILD FROM INDEX the utility will use the existing index structure to extract symbolic key information while FROM MEMBERS or FROM ALLROWS requires that the database area of the member record is swept resulting in more physical I/O operations during the extract phase of the process. There is no difference in the amount of work generated during the steps that recreate the index structure.
Case 2: An intact system-owned non-MA network index
If this is a system-owned index defined on a network database which is not MA (OA, MO, or OA) and the integrity of an index is intact, then a REBUILD FROM MEMBERS should be used.
Case 3: A system-owned network index with questionable integrity (MA or non-MA)
If this is a system-owned index defined on a network database and there is any question about the integrity of the existing index structure a REBUILD FROM MEMBERS should be used, regardless of whether this is system-owned or user.
Case 4: A user-owned index defined on a network database
If this is a user-owned index defined on a network database, then you must write a program which calls the utility program IDMSTBLU and passes information about the indexes to be operated on and the owner and member record occurrences participating in the indexes. Details on how to do these calls are included in the CA IDMS Utilities Guide in the MAINTAIN INDEX section, in the discussion about User-Owned indexes.
Once this user-written program executes, then you can complete the rebuild operation by executing the MAINTAIN INDEX utility instep mode specifying FROM SORT3. Use the SYSPCH, SYS002, and RELDCTL work files generated by IDMSTBLU as input to the MAINTAIN INDEX utility by specifying them with the DDnames SYS001, SYS003, and RELDCTL respectively.
If changes are being made to the index structure, then the CA IDMS Utilities Guide should be consulted for more details about the considerations involved in this process.