Consider indexing columns that are used frequently in WHERE clauses |
Consider indexing columns that are used frequently to join tables in SQL statements |
Only index columns when only a few rows have the same value in the columns indexed |
Do not index columns with few distinct values |
Do not index columns that are frequently modified |
Do not index columns that only appear in WHERE clauses with functions or operator |
Consider indexing foreign keys (see later) of referential integrity constraints in cases in which a large number of concurrent INSERT, UPDATE, and DELETE statement access the parent and child tables |
When choosing whether to index a column, consider whether the performance gain for queries is worth the performance loss for INSERT, UPDATE, and DELETE statements and use of the space required to store the index |