What are the advantages and disadvantages of using indexes?
Advantages of indexes :
- Speed up the SELECT query
- If index is set to fill-text index, then we can search against large string values.
Disadvantages of indexes:
- They decrease performance on inserts, updates, and deletes because on each operation the indexes must also be updated.
- Speed up UPDATE if the WHERE condition has an indexed field.
- Indexes take extra disk space to save index.
Related
find the nth highest salary in mysql without limit
How to find greater than average salary records in MySQL
how to find duplicate records in MySQL query
How to use second index forcefully in MySQL
How to get total number of rows in MySQL table with and without count