sp_show_statistics_steps (SQL Server Compact Edition)
The stored procedure sp_show_statistics_steps returns a histogram representing the current distribution statistics for the specified index in the specified table.
Syntax
sp_show_statistics_steps '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 |
---|---|
RANGE_HI_KEY |
The upper bound value of the histogram step. |
RANGE_ROWS |
The number of rows from the sample that fall within each histogram step, excluding the upper bound. |
EQ_ROWS |
The number of rows from the sample that are equal in value to the upper bound of the histogram step. |
DISTINCT_RANGE_ROWS |
The number of distinct values within a histogram step, excluding the upper bound. |
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.
Example
The following example displays statistics information for the AK_Product_Name
index of the Address
table.
sp_show_statistics_steps 'Address', 'AK_Product_Name'
See Also
Reference
sp_show_statistics (SQL Server Compact Edition)
sp_show_statistics_columns (SQL Server Compact Edition)
Other Resources
Enhancing Performance (SQL Server Compact Edition)