I am in a process of adding non clustered indexes to SQL Azure DB and I wonder what is the difference between having multiple columns in a single non clustered index, compared to having multiple non clustered indexes with each having a single column in it?
Share
Consider a table
Twith a clucstered PKIdcolumn, and additionally columnsA,B,C.A single nonclustered index containing
A,B, andCcould support fast lookup for queries such as:but not
in both of which cases, we can’t do any better than a table scan
However, if we have multiple indexes,
IX_AonA, etc:would all benefit from an index, and a composite query such as
would have a small benefit too.