Quantcast
Channel: Questions in topic: "sql-server-2005"
Viewing all articles
Browse latest Browse all 415

Help with the proper index

$
0
0
I have a table with a lot of columns. In a particular query being generated by a web API it selects 23 columns of data. With 4 of those columns in the where clause. I am assuming that in order to avoid any bookmark lookups that I would need to create an index on the most selective column and then include the remaining 22 columns as included columns. Is this the correct approach? I ask because in my testing the only way I have avoided RID lookups is by including all the columns as included columns and the primary index being on a very selective column. Any pointers, gotcha's and assistance is very much appreciated.

Viewing all articles
Browse latest Browse all 415

Trending Articles