Parameters
which | index number |
enable | desired state |
tablename | table name - only in SQL |
Description
This function activates or deactivates indexes of a table specified by the tablename name. If enable equals TRUE, index usage will be enabled, if FALSE, index usage and actualization will be disabled. Index disabling may fasten program operation (e.g. before a long import).
The which parameter must equal -1 (= all indexes) in this version.
You may use this function to rebuild table indexes (see example).
Function value
The function returns FALSE if successful. Otherwise returns TRUE and the error nature may be told by calling the Signalize
function.
Example (SQL):
Rebuild indexes in the Company table:
CALL Enable_index("Company",-1,FALSE); CALL Enable_index("Company",-1,TRUE);