In the previous post, we went over the details of DBCC_SHOW_STATISTICS, now let’s see how this comes together. We shall run the histogram for the ProductID from the Sales.SalesOrderDetail table.
DBCC SHOW_STATISTICS('Sales.SalesOrderDetail', IX_SalesOrderDetail_ProductID) WITH HISTOGRAM ;
-- Review the section for range 826 - 831
Pay attention to the Range_HI_Key of 831. The Avg_Range_Rows are 36 2/3. Now let’s run a query to see how SQL Server Read more about Statistics and PowerBI Visualizations, Part Two[…]