DROP INDEX

Remove an index

Synopsis:

 DROP INDEX [IF EXISTS] [database-name .] index-name 

Description:

The DROP INDEX statement removes an index previously added with the CREATE INDEX statement. The index named is completely removed from the disk. The only way to recover the index is to reenter the appropriate CREATE INDEX command.

In the default mode, the DROP INDEX statement doesn't reduce the size of the database file. Empty space in the database is retained for later INSERT commands. To remove free space in the database, use the VACUUM command. If auto-vacuum mode is enabled for a database, then space will be freed automatically by DROP INDEX.

The optional IF EXISTS clause suppresses the error that would normally result if the index doesn't exist.