June 17th, 2009
Data Definition Language, DROP INDEX
Posted by
admin in
Q. Data Definition Language
DB2, Oracle, PostgreSQL Format:
DROP INDEX index_name;
Access, MySQL Format:
DROP INDEX index_name
ON table_name;
SQL Server Format:
DROP INDEX table_name.index_name;
Because an index is completely separate from its associated table, it can be deleted at any time without any effect on the base table other than performance issues. All SQL code will continue to function normally.
Most RDBMS systems have tools for measuring performance. If a table is small, or the data is infrequently referenced, you may choose to remove the index.
The SQL standard does not mention indices so vendors do their own implementation.
Comments Off