docs/sql-reference/statements/drop-index.mdx
Remove an index from the database. The underlying table and its data are not affected.
DROP INDEX [IF EXISTS] [schema-name.]index-name;
DROP INDEX removes a previously created index. After the index is dropped, the query planner can no longer use it to optimize queries. The table data is unchanged.
| Parameter | Description |
|---|---|
IF EXISTS | Prevents an error if the index does not exist. The statement is a no-op when the index is absent. |
schema-name | The name of the attached database containing the index. Defaults to the main database if omitted. |
index-name | The name of the index to drop. |
DROP INDEX idx_users_email;
DROP INDEX IF EXISTS idx_old_search;
DROP INDEX aux.idx_sessions_token;