Remove an index


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


The DROP INDEX statement removes an index 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.

The DROP INDEX statement does not reduce the size of the database file in the default mode. Empty space in the database is retained for later INSERTs. To remove free space in the database, use the VACUUM command. If AUTOVACUUM 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 does not exist.