Improvement
This update introduces a new Dynamic Management View (DMV) sys.dm_db_stats_histogram in Microsoft SQL Server 2016. The sys.dm_db_stats_histogram DMV is an improved version of the DBCC SHOW_STATISTICS WITH HISTOGRAM management command.
The syntax of the new sys.dm_db_stats_histogram DMV specification is provided as follows:
sys.dm_db_stats_histogram (object_id, stats_id)
The new DMV outputs the result set as a table that resembles the following:
Column Name |
Data type |
Description |
object_id |
int |
ID of the object (table) for which to return the properties of the statistics object. |
stats_id |
int |
ID of the statistics object. Is unique within the table. For more information, see sys.stats (Transact-SQL). |
step_number |
int |
Number of steps in the histogram. For more information, see DBCC SHOW_STATISTICS (Transact-SQL). |
range_high_key |
int |
Upper bound column value for a histogram step. The column value is also called a key value. |
range_rows |
bigint |
Estimated number of rows whose column value falls within a histogram step, excluding the upper bound. |
equal_rows |
bigint |
Estimated number of rows whose column value equals the upper bound of the histogram step. |
distinct_range_rows |
bigint |
Estimated number of rows with a distinct column value within a histogram step, excluding the upper bound. |
average_range_rows |
bigint |
Average number of rows with duplicate column values within a histogram step, excluding the upper bound (RANGE_ROWS / DISTINCT_RANGE_ROWS for DISTINCT_RANGE_ROWS > 0). |
Resolution
This improvement is first included in the following cumulative update for SQL Server:
Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. Check out the latest cumulative updates for SQL Server:
Status
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.
References
Learn about the terminologythat Microsoft uses to describe software updates.