Subscribe

SQLServer-DBA.com Links

Subscribe to newsletter

Dba_db2_button

Powered by TypePad
SQL Server - Find last time STATISTICS updated - update statistics

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')

 Read More

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


Author: Jack Vamvas (http://www.sqlserver-dba.com)

******** *******

Subscribe to SQLServer-DBA.com

Latest posts delivered to you daily

Delivered by FeedBurner

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

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.

Working...

Post a comment


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact|Copyright & Disclaimer