• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 808
  • Last Modified:

DBCC SHOW STATISTICS

When I use DBCC SHOW_STATISTICS there is a column named Desity.

Does 1 = High desity and 0 = Low desity?
0
Mr_Shaw
Asked:
Mr_Shaw
  • 3
1 Solution
 
Imran Javed ZiaCommented:
Hi,

Calculated as 1 / distinct values for all values in the first key column of the statistics object, excluding the histogram boundary values. This Density value is not used by the query optimizer and is displayed for backward compatibility with versions before SQL Server 2008

Please follow the link for more details:

http://msdn.microsoft.com/en-us/library/ms174384.aspx

Thanks
0
 
Mr_ShawAuthor Commented:
Sometimes the column shows 1 or 0.

What does 0 mean?
0
 
Imran Javed ZiaCommented:
The results returned indicate the selectivity of an index (the lower the density returned, the more selective the index is) and provide the basis for determining whether an index is useful to the query optimizer. The results returned are based on distribution steps of the index.

http://msdn.microsoft.com/en-us/library/ms174384(v=SQL.90).aspx
0
 
Imran Javed ZiaCommented:
More duplicates = high density.
The less duplicates the lower the density

So in a column that has ALL Duplciates you should see a density of 1
In a col with few to no duplciates it should be a very small number (1.000E-4) or maybe 0
0

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now