none
index leading edge RRS feed

  • Question

  • Should the leading edge of an index be the most selective column or the column which is used to join two tables?
    Mr Shaw
    Tuesday, November 8, 2011 4:53 PM

Answers

  • Generally, the first key column in a multi-column index should be the most selective.  EXCEPT if it needs to match up, for example, with the first equality predicate in a WHERE clause.  This would also be applicable to the columns involved in a JOIN.

    Please have a look at Index Selectivity and Column Order

    • Marked as answer by Mr Shaw Wednesday, November 9, 2011 5:29 PM
    Wednesday, November 9, 2011 1:35 AM