Join the MemSQL Community Today
Get expert advice, develop skills, and connect with others.
Drop the specified index on the specified table.
DROP INDEX index_name ON tbl_name
index_nameis the name of the index you want to drop.
tbl_nameis the name of a table in a MemSQL database.
CLUSTERED COLUMNSTOREindexes and
FULLTEXTindexes cannot be dropped using
DROP INDEX. If a table having these indexes is dropped, the indexes are deleted automatically.
DROP INDEX, which means that you can read and write while the index is being dropped on a table.
DROP INDEXon a sharded table is always executed online. Note that online
DROP INDEXwill not begin dropping the index on the table, but it will wait until all DML queries that were already running on the table finish. This allows any in-progress queries to complete execution before dropping the index on the table, and ensures consistency of results from queries on the table since the time of execution of
DROP INDEX. As soon as the in-progress reads and writes complete and the
DROP INDEXcommand begins dropping the index on the table, new reads and writes will proceed as normal. This blocking period usually lasts on the order of milliseconds.
DROP INDEXstatements on a table and have a lot of long-running queries on that table, then your normal workload may experience some periods of delay since it blocks other queries from starting while it waits for completion of long-running queries.
memsql> DROP INDEX my_index ON my_tbl; Query OK, 0 rows affected (0.71 sec) Records: 0 Duplicates: 0 Warnings: 0