Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

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:

Cumulative Update 2 for SQL Server 2016 SP1

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:

Latest cumulative update for SQL Server 2016

 

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.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×