How to Drop Indexes in MySQL

Looking for dropping indexes in MySQL table? Here is a simple how to:

Drop Index MySql

Removing index from a column or a field is quite simple. All you need to know is the exact index name of the table you’re working on.

To check and display the index names of your table, refer to the post below:
View, Add and Drop Indexes in MySql

For dropping the index of your table, execute the following SQL query:

ALTER TABLE test_table
DROP INDEX your_index_id;

where your_index_id is the name of your index.

WARNING: Before You Drop Any Index

If you have huge amount of data in your table and this specific field or index is being used in your MySQL queries, make sure you modify those queries and start using the alternate field for your queries before dropping index. Otherwise there are mostly chances that your website performance will affect, making your website load time slower or even worst.

Share with:


Leave a Reply

Login with:



Your email address will not be published. Required fields are marked *