Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2007-12-20 : 13:30:17
|
| If you run DBCC SHOW_STATISTICS on an index. Is it still true that the lower the Density the better or has it changed? I have a clustered index on a table and it is showing the density at 1. I thought that it would be lower than that.I had used this article as a reference, but maybe it only applies to 200? [url]http://www.extremeexperts.com/sql/Articles/SHOW_STATISTICS_2000.aspx[/url]Any insight would be of great interest. |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-12-20 : 15:38:31
|
| Worked same as sql2k. Did you update statistics for the table? |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2007-12-20 : 16:06:28
|
| Yeah I updated statistics with a full scan. |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-12-20 : 16:35:34
|
| Then you should check values in the column. |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2007-12-20 : 16:44:33
|
| Anything specific I should look for? I verified that there are no duplicates (as expected do to the constraint). |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-12-20 : 17:31:30
|
| Did you check 'all density' in the result? |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2007-12-20 : 18:01:16
|
| All Density is 6.434133E-09 |
 |
|
|
rmiao
Master Smack Fu Yak Hacker
7266 Posts |
Posted - 2007-12-20 : 19:52:08
|
| That sounds correct. By the way, this is what kb article 'Statistics Used by the Query Optimizer in Microsoft SQL Server 2005' said about density:The Density value included in the first row returned by dbcc show_statistics is the density of all values sampled other than the RANGE_HI_KEY values. The RANGE_HI_KEY values are typically the more frequent values in the distribution. Hence, the displayed Density gives potentially useful information about the density of non-frequent values. |
 |
|
|
|
|
|