07 January,2013 by Jack Vamvas
Maintaining statistics is an important factor for SQL Server performance. Accurate information allows SQL Server to make more effective decisions on how to execute SQL Server code.
The SQL Server optimizer uses cardinality estimations as part of the decision making process. If inaccurate data distribution statistics exist for a table or index, then the Optimizer will make inefficient decisions
To find out the last time statistics were updated on a table or index , use the sys.stats view. This view has a row for each statistic of a tabular object.
The sys.stats view does not provide histogram data. You’ll need to use DBCC SHOW STATISTICS .
SELECT STATS_DATE(OBJECT_ID,STATS_ID),* FROM SYS.STATS WHERE OBJECT_ID = OBJECT_ID('myTable')
SQL Server Query Optimizer and Statistics - SQL Server DBA
Auto Update Statistics and Update Statistics in SQL Server
SQL Server - Index missing Statistics - SQL Server DBA
Filtered statistics, T-SQL best practises for T-SQL Tuesday
This is only a preview. Your comment has not yet been posted.
As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.
Having trouble reading this image? View an alternate.
Posted by: |