sp_show_statistics_columns (SQL Server Compact)

The stored procedure sp_show_statistics_columns displays the current distribution statistics for the specified index in the specified table.

sp_show_statistics_columns 'table_name' , 'index_name'


The name of the table that contains the index.


The name of the index on which you want statistics.

The following table describes the columns returned in the result set.

Column Name



The selectivity of a set of index column prefixes.


The average length of a set of index column prefixes.


The names of index column prefixes for which ALL_DENISTY and AVERAGE_LENGTH are displayed.

The results returned indicate the selectivity of an index. A lower density indicates greater selectivity. The results 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.

The following example displays statistics information for the Employees_PKindex of the Employees table.

sp_show_statistics_columns 'Employees', 'Employees_PK';