Where to Place Equality and Inequality Columns What are Equality and Inequality Columns anyway?
A column is identified as an Equality or Inequality column depending on how the column is used in a WHERE or JOIN predicate. When a column is used in a conditional operation like this: … MyColumn = ABC … It is known as an Equality column. Here the column named MyColumn is being compared to the string ABC using the equal (=) operator. This is why in this case MyColumn is considered an Equality column. If a column was used like this: … MyColumn >= ABC … Then it is known as an Inequality column. Here MyColumn is being compared to the string ABC , but the operator is not the equal sign, but is using the greater than or equal sign (>=). The greater than or equal operator makes MyColumn an Inequality column. Also if a column is used with any operator other than the equal sign (=), meaning it is using <>, >, <, <=, etc... then it is considered to be an Inequality column. When creating a multi-column index it is important to make sure you place equality columns first in your index, pri