Hi Gail,
I read all the articles listed in your link. This is really very good information.
All the requirement & best practice are good. But I have still a question in my mind.
In my case we have more than 10 columns.
I think, we cannot define a specific sequence for non clustered index which will best suite our dynamic query.
E.g: If we have:
FirstName, LastName, Address, City, State, Zip, Phone, Email
eight columns which takes part in our dynamic query, then how can we decide the exact sequence of where clause. If I consider index (lastname, firstname, ..........), it will only work for those queries which will contain where clause like this:
LastName = 'text' and firstname = 'text' and ...............
but what about those queries which does not contain lastname. In that case, this non clustered index will become useless. Will I have to create 8 * 8 = 64 indexes (or any other number count. Sorry, I am not too good in permutation/combination).
Thanks to Microsoft who gave us the opportunity to create 999 non clustered indexes.
I just want to raise a question: How can we say that this specific sequence of columns will be best suited when all columns have equal priority? sometimes, I will not pass lastname & sometimes city or postal code or zip also.
& this situation will become more worse when number of columns will increase.