4D v14.3PAUSE INDEXES |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
PAUSE INDEXES
PAUSE INDEXES
The PAUSE INDEXES command temporarily disables all the indexes of aTable, except for the index of the primary key. The indexes are not physically deleted from the data (.4DIndx file) or the structure of the database (_USER_INDEXES, see System Tables), but they are rendered invalid and are thus no longer updated. When indexes are disabled, all the operations performed on aTable (queries, sorts, record additions, modifications and deletions) no longer use the indexes. This command is mainly useful when you are importing or modifying large amounts of data in tables that have several indexes. Since 4D must update the indexes each time a record is validated, the operation could take a considerable amount of time. Disabling the indexes beforehand can significantly speed up the operation. To resume the indexes after the operation is over, you can just call the RESUME INDEXES command for aTable. Note: You can obtain a similar result by using the CREATE INDEX and DELETE INDEX commands, but you will have to call them for each index of aTable. If you call the PAUSE INDEXES command for a table and then quit the database without having called the RESUME INDEXES command for this table, all this table’s indexes are automatically rebuilt when the database is restarted. Note: This command cannot be executed from a 4D remote. Example of method for importing large amounts of data: PAUSE INDEXES([Articles]) |
PROPERTIES
Product: 4D
HISTORY
SEE ALSO ARTICLE USAGE
4D Language Reference ( 4D v14 R3) |
||||||||||||||||||||||||||||||||||||||||||||||||||||||