Friday, September 14, 2012

How many database Indexes is too many?

Having a lot of indexes on your table will affect the performance of your table either bad side or good side. It depends on what operation you use most.
Index will help fasten your query, and at the same time might slow your query down. When you do a lot of insertion, update, deletion based on the index columns, this will slow the query down. On the other hand, it will also help with select statement.

So how many indexes you should have just depends on the characteristic of statement you will use. If you have a lot of insert, update, delete statement, then too many indexes is not so good. While having most of query as select statement, then it is worth having many of them.