1) DBCC SHOW_STATISTICS
Introduction:
To get detailed statistical information on the density of data of a particular table or index, in SQL Server, we have the DBCC SHOW_STATISTICS command.
Usage:
Another DBCC Informational command is SHOW_STATISTICS. It is used to validate the statistics of an index or table. It displays in-depth details of the data distribution of a database object which helps database administrators at the time of query analysis & optimizing query performance.
Example:
Syntax:
DBCC SHOW_STATISTICS (<TableName>,<IndexName>);
Example:
DBCC SHOW_STATISTICS ('EmpMaster', 'IX_EmpMaster_DeptID');
Benefits:
This DBCC command offers multiple benefits:
1. Query Optimization:
It helps database administrators to decide whether the new index is required or needs to modify the existing index or need to remove any existing index to improve the performance of a query.
No comments:
Post a Comment