Including a primary key in a nonclustered index in SQL Server 2005
The query optimizer for SQL Server 2005 is suggesting that we include a primary key as part of a nonclustered index. Is it OK to include that to increase SQL performance?
View Answer
| Jul 2 2008 5:36 PM GMT
| asked by
SQL Server Ask the Experts
SQL Server 2005, Primary keys, Index
Why is the query using the index even though the perecentage of unique values is 52%?
I have a table with no primary key and a non-clustered composite index of two columns. When I look at the number of distinct values (selectivity ratio), the table has a ratio of 52% unique values. I thought an index should be at least 90% unique in order for it to be used. Yet when I run the...
View Answer
| Mar 3 2008 5:09 AM GMT
| asked by
Abbi
Indexes, SQL performance, SQL


