Home > Mobile >  Will adding multiple indexes slow down frequently inserting rows to the end of a table?
Will adding multiple indexes slow down frequently inserting rows to the end of a table?

Time:11-06

I've heard the benefits of indexes and I've heard the cons as well. One of which is that INSERT becomes slower. If I have a table that I am frequently appending a single row to the end of, is that a good reason not to not use indexes?

CodePudding user response:

This all comes down to trade-offs -

If you need to quickly find the values more so than quickly inserting, then keep the index.

If Inserting quickly is more important, maybe consider not indexing.

I'd say from my experience, indexing will always be better - looking up the data quickly is usually the most important, and generally won't slow an Insert function by much. This only comes down to if you have multiple indexes - if just one or two, probably won't have much of an impact.

  • Related