HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

What are the disadvantages if indexes are added on all columns?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
thewhatallareaddedcolumnsindexesdisadvantages

Problem

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?

Solution


  • 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.

Context

StackExchange Database Administrators Q#39966, answer score: 5

Revisions (0)

No revisions yet.