In order for this site to work correctly, and for us to improve the site, we need to store a small file (called a cookie) on your computer.
By continuing to use this website, you agree to our cookies and privacy policy.
  
Home page Home page Home page Home page
Pixel
Pixel Header R1 C1 Pixel
Pixel Header R2 C1 Pixel
Pixel Header R3 C1 Pixel
Pixel

Batch.Indexing

BATCH.INDEXING is a routine which permits the buffering of index transactions in memory until certain pre-set limits are reached. Using this routine, speed improvements of 30%+ are typical. The usage is simple, just call

     BATCH.INDEXING(1, File_Var) to turn batching on, and
     BATCH.INDEXING(0, File_Var) to turn it off.

From thereon, index transactions are buffered in memory for that file and not actually written to the ! datafile. The pre-set limits are documented in the latest "System Subroutines" book from Revelation Technologies as follows

"BATCH.INDEXING either buffers a set amount of data (1,000 bytes) or buffers for a limited time (5 seconds), whichever occurs first, so you need not be concerned with overrunning memory space".

Caveats

The information buffered by BATCH.INDEXING is only flushed to disk by the ! code and by a direct call to BATCH.INDEXING turning the buffering off. Further, only one file is buffered at a time. This has four major implications ;

     You should NEVER logoff without first turning BATCH.INDEXING off. If
     you do, any buffered transactions will be lost. (Fixed in 2.12)

     The time between flushes is only 5 seconds if records are continually
     being written to disk through the ! code. That is, if a record is
     written to disk and then the machine is left standing for 24 hours the
     buffered transaction will still be in memory. However the moment a
     record is written to the same file the record will be flushed.

     Neither INDEX.FLUSH nor background indexing flush the buffered
     transactions to disk, regardless of the "Delay before indexing"
     settings.

     If BATCH.INDEXING is started on one file and transactions are buffered
     and then BATCH.INDEXING is started on a new file, the old transactions
     will be written to the new file.
(Volume 3, Issue 9, Pages 5,6)
Pixel
Pixel Footer R1 C1 Pixel
Pixel
Pixel
Pixel