by Dinesh Thakur Category: SQL Commands

The SQL DROP INDEX statement is the SQL command that removes an entire SQL index. You may drop an index permanently when it is no longer useful or temporarily. If the index is harming or not helping performance it could be dropped.

Indexes may slow down the loading of data because they must be maintained during the data load process. For high performance loads, an index could be dropped for the duration of a load and then recreated. You cannot use the DROP INDEX statement to remove an index that has a PRIMARY KEY or UNIQUE constraint. To remove the constraint and then delete the index, use ALTER TABLE with the DROP CONSTRAINT clause.

Syntax:DROP INDEX [INDEX_NAME];

Example: SQL> DROP INDEX RAMAN_DHILLON;

NOTE:

1. Even though sql indexes are created to access the rows in the table quickly, they slow down DML operations like INSERT, UPDATE, DELETE on the table, because the indexes and tables both are updated along when a DML operation is performe, So use indexes only on columns which are used to search the table frequently

2. It is not required to create indexes on table which have less data.

3. In oracle database you can define up to sixteen (16) columns in an INDEX.

Related Articles of SQL




About Dinesh Thakur

Dinesh ThakurDinesh Thakur holds an B.SC (Computer Science), MCSE, MCDBA, CCNA, CCNP, A+, SCJP certifications. Dinesh authors the hugely popular blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps. For any type of query or something that you think is missing, please feel free to Contact us.



Search Content