BUILD.INDEX |
|
|
The BUILD.INDEX command populates an alternate key index
Format
BUILD.INDEX filename field(s) {CONCURRENT}
BUILD.INDEX filename ALL {CONCURRENT}
where
The BUILD.INDEX command deletes any existing index data for the named field(s) and populates the index by processing all records currently in the file. The ALL keyword can be used to build all indices that have been created for the file.
BUILD.INDEX is best performed immediately after using CREATE.INDEX to construct the index. Once the index has been built, it will be maintained automatically whenever changes are made to the file and will be used automatically by the query processor. The MAKE.INDEX command combines index creation and build into a single operation.
Except when used with the CONCURRENT keyword, the BUILD.INDEX command requires exclusive access to the file and may take some time to complete for a very large file. It is therefore best executed at quiet times.
The CONCURRENT keyword allows an index to be built while the file is in use. There is a small performance overhead for this and the QMBasic SELECTINDEX, SELECTLEFT and SELECTRIGHT statements may stall waiting for the build to complete.
See also: CREATE.INDEX, DELETE.INDEX, DISABLE.INDEX, LIST.INDEX, MAKE.INDEX, REBUILD.ALL.INDICES |