1.

On Which Columns You Should Create Indexes?

Answer»

In general, you should CREATE an index on a column in any of the following SITUATIONS:

  • The column is queried frequently.
  • A referential integrity constraint exists on the column.
  • A UNIQUE KEY integrity constraint exists on the column.

The following list gives guidelines in choosing COLUMNS to index:

  • You should create indexes on columns that are USED frequently in WHERE clauses.
  • Are used frequently to join tables.
  • Are used frequently in ORDER BY clauses.
  • On columns that have few of the same values or unique values in the table.

In general, you should create an index on a column in any of the following situations:

The following list gives guidelines in choosing columns to index:



Discussion

No Comment Found