Option 1: Within the
Data Administration tool, go to the
Utilities menu and select
Index Deactivation to choose which indexes to deactivate.
Alternatively within the
Data Dictionary tool navigate to the table where the index is located, in the Options menu select Index Mode, open the index which needs to be deactivated open the corresponding index that needs to be deactivated and uncheck the
Active check-box for that index.
Option 2: Deactivate indexes with _index._activeThe following example deactivates all indexes, except the primary index and can be customized to requirements:
FOR EACH _file WHERE _file-number > 0 AND NOT _file-name BEGINS "SYS":
FOR EACH _index OF _file WHERE _active = YES
AND RECID(_index) NE _file._prime-index:
Assign _index._active = NO.
END.
END.
The following example confirms which indexes are marked inactive:
FOR EACH _file WHERE _file-number > 0 AND NOT _file-name BEGINS "SYS":
FOR EACH _index OF _file WHERE _active = YES:
DISP _file-name _index-name.
END.
END.
Option 3: Deactivate indexes with a .df file
Indexes can also be inactivated by loading a .df to deactivate the required indexes:
Example: A .df file to de-activate the Customer non-Primary indexes in the sports2000 sample database:
UPDATE INACTIVE INDEX "DeptCode" OF "Employee"
UPDATE INACTIVE INDEX "CountryPost" ON "Customer"
UPDATE INACTIVE INDEX "DeptCode" OF "Employee"
UPDATE INACTIVE INDEX "Name" OF "Employee"
.
PSC
cpstream=1252
.
0000000136