Solved

# DBCC SHOW STATISTICS

Posted on 2011-05-06
529 Views
When I use DBCC SHOW_STATISTICS there is a column named Desity.

Does 1 = High desity and 0 = Low desity?
0
Question by:Mr_Shaw

LVL 16

Expert Comment

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

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

Thanks
0

Author Comment

Sometimes the column shows 1 or 0.

What does 0 mean?
0

LVL 16

Expert Comment

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

LVL 16

Accepted Solution

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

The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how the fundamental information of how to create a table.