Wednesday, September 14, 2016

Indexes usage

Indexes usage:

1> Too many indexes / Too few indexes - both are equally bad for the system
   - Too few :: Full table scan. SELECT Queries will take time.
   - Too many :: DML operation may get slow, as they have to update page indexing.
2> Never put index on column which is regularly updated.
3> All SELECT queries should be indexed properly. Exception can be taken:
   - Column with low cardinality. (like M/F or Y/N)  
   - Column which is updated often.
4> Log queries which are not using indexes.
5> Check explain plan for the queries been captured.

No comments:

Post a Comment