Mysql – What are the disadvantages if indexes are added on all columns

index-tuningMySQL

I know, that it is not a good design to set too many indexes, but just for understanding the theory:
What exactly are the disadvantages if you add an index on all columns in a table in MySQL?

  • Are the queries getting slower if I have indexes on columns, that i
    rarely use?
  • Are the inserts somewhat slower?
  • Is MySQL able to pick out the best index that speeds up the query?

Best Answer

  • Insert/Updates/Delete speed will degrade. The index has to be updated on data modification.
  • I don't know mysql in fine details but it also means more time spent by the query planner to determine the indexes to use.
  • More disk space.

These are the key disadvantages.