Tim Walker (6/25/2009)
I wouldn't recommend testing behaviour on empty tables either, because I think it can produce misleading results.
Indeed. Reading 0 pages is pretty quick no matter what index.
Load the table up with a million or so rows and, provided that the length of the strings in those varchars are close to the declared value, I suspect that the index with B as the key col will most likely be favoured. It's close and the difference is unlikely to appear on small-mid sized tables
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability