Drop indexes

Command group Flag affected Reversible Execute on client Platform(s)
Data management YES NO NO All

Syntax

Drop indexes {file-name}

Description

This command deletes all the indexes for the specified file apart from the record sequence number index. This enables intensive operations such as data import to proceed without the overhead of updating all the indexes. You can use Build indexes to rebuild the indexes which were dropped.

If the specified file name does not include a data file name as part of the notation, the default data file for that file is assumed. If the file is closed or memory-only, the command does not execute and returns with the flag false.

If you are running on a shareable volume, Omnis automatically tests that only one user is logged onto the data file (the command fails with flag false if this is not true) and further users are prevented from logging onto the data until the command completes.

If a working message with a count is open while the command is executing, the count will be incremented at regular intervals. The command may take a long time to execute, and it is not possible to cancel execution even if a working message with cancel box is open.

The command is not reversible: it sets the flag if it completes successfully and clears it otherwise, for example if there is more than one user logged onto the data file.

Example

; fast import
Do not flush data
Drop indexes {fCustomers} ;; drop the indexes
Do method ImportData ;; import the data
Build indexes {fCustomers} ;; rebuild the indexes