February 10, 2006 at 11:22 am
Hi All,
I have an index consisting of three columns of a table say col A,B and C.
If my query uses only col A , or only col A and B in the where clause , will the above index be utilized by the query?
Thanks,
Rajesh
February 10, 2006 at 11:34 am
February 10, 2006 at 11:41 am
Thanks for the responding to my post.
February 10, 2006 at 11:53 am
The answer is "maybe".
It depends on type of index and data distribution. If you query on A, and there are large numbers of repeating values of A in the index, and the index is non-clustered, the optimizer may decide it is not selective enough and not use the index.
February 10, 2006 at 2:11 pm
The answer is "maybe".
It depends on type of index and data distribution. If you query on A, and there are large numbers of repeating values of A in the index, and the index is non-clustered, the optimizer may decide it is not selective enough and not use the index.
Good to know this fact. I'll definitely keep this in mind.
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply