sp_show_statistics_columns (SQL Server Compact Edition)

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

Syntax

sp_show_statistics_columns 'table_name' , 'index_name'

Arguments

  • table_name
    The name of the table that contains the index.
  • index_name
    The name of the index on which you want statistics.

Result Set

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

Column Name Description

ALL_DENISTY

The selectivity of a set of index column prefixes.

AVERAGE_LENGTH

The average length of a set of index column prefixes.

COLUMNS

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

Remarks

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.

Example

The following example displays statistics information for the AK_Address_rowguid index of the Address table.

sp_show_statistics_columns 'Address', 'AK_Address_rowguid'

See Also

Reference

sp_show_statistics (SQL Server Compact Edition)
sp_show_statistics_steps (SQL Server Compact Edition)

Other Resources

Enhancing Performance (SQL Server Compact Edition)

Help and Information

Getting SQL Server Compact Edition Assistance