KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Speed up a batch operation on a table with indexes
PRODUCT: 4D | VERSION: 14.0 | PLATFORM: Mac & Win
Published On: March 21, 2014

Every time a record with an index is updated, the operation must go into disk and update the index file. This vastly slows down the operation. In v14, the command PAUSE INDEXES will temporarily halt editing the index files. Once indexes have been paused, operations performed on the record will be much faster. Calling the command RESUME INDEXES will rebuild the index files. This will be a batch operation and will be performed much quicker than doing it record by record.

PAUSE INDEXES([Table_1])
//Perform operation on number of records
RESUME INDEXES([Table_1])