Save disk space by deactivating indexes
- Last Updated: January 25, 2024
- 2 minute read
- OpenEdge
- Version 12.8
- Documentation
You can free up disk space for an application by deactivating its indexes. Also, if you are dumping and loading a large database, you can speed up the operation by deactivating the indexes in one or more database tables. This technique should be used only in situations where indexes are used infrequently, such as in an application that generates reports only once or twice a year. There are two ways to deactivate indexes:
- Use the Data Administration tool (if you are using a graphical interface)
- Use the Data Dictionary tool (if you are using a character interface)
You can deactivate (but not reactivate) a single index from either Data tool. If you create a new unique index on an existing file, consider deactivating the index. If existing table data yields duplicate keys, all changes made during the current session are backed out when you try to save them. Create or reactivate a unique index after you have ensured that all key values are unique.
To activate an index, use PROUTIL IDXBUILD. For more information about activating indexes with PROUTIL IDXBUILD, see PROUTIL IDXBUILD qualifier.
Once an index is deactivated, you cannot use it to retrieve information
from the records it normally points to. If you attempt to use a FOR, FOR
EACH, or CAN-FIND statement in connection
with a deactivated index, the database engine terminates the currently
executing program. However, you can create, delete, or update a
record that a deactivated index points to.
The database engine does not examine the active status of an
index when it makes a search. Nor does the active status of an index
affect the time stamp on the _Index file. As a
result, precompiled programs do not require compilation if the only
change to the schema is index activation or deactivation.