DROP INDEX

Delete the index.

Summary

DROP INDEX [ CONCURRENTLY ] [ IF EXISTS ] name [, ...] [ CASCADE | RESTRICT ]

describe

DROP INDEX deletes existing indexes from the database system. To execute this command, you must be the owner of the index.

Parameters

CONCURRENTLY

  • Delete indexes without locking concurrent selection, insertion, update and delete on index tables. Normal DROP INDEX acquires exclusive locks on the table, thus blocking other accesses until index deletion can be completed. With this option, the command will wait until the conflicting transaction completes.
    A few things to note when using this option. Only one index name can be specified and the CASCADE option is not supported. (So, indexes that support UNIQUE or PRIMARY KEY constraints cannot be deleted in this way.) Also, conventional DROP INDEX commands can be executed within transaction blocks, but cannot be executed in DROP INDEX CONCURRENTLY mode.

IF EXISTS

  • If the index does not exist, please do not report an error. In this case, a notification will be issued.

name

  • The name of the existing index (can be specified by the schema).

CASCADE

  • Automatically delete objects that depend on index.

RESTRICT

  • If any object depends on the index, the index is denied. This is the default value.

Example

Delete the index title_idx:

DROP INDEX title_idx;

compatibility

DROP INDEX is an extension of the YMatrix database language. There is no indexing provision in the SQL standard.

See also

CREATE INDEX , DROP INDEX