SQL Server Admin
T-SQL Articles

May 12, 2008

Determine when was Statistics last updated on your Table




The STATS_DATE gives back the date specifying when was the statistics for the specified index last updated.

You can use the following query to get the last updated date of Statistics for the object

USE Northwind
SELECT [name] AS 'Statistic',
STATS_DATE(object_id, index_id) AS 'Last Updated Statistics Date'
FROM sys.indexes
WHERE object_id = OBJECT_ID('Customers');
GO

The query returns NULL in case of an error or if the caller lacks permissions to view the object.

If you need to study more on Statistics, check this link


Did you like this post?
kick it on DotNetKicks.com
subscribe via rss subscribe via e-mail
print this post follow me on twitter



 
  Feedback:

comments

0 Responses to "Determine when was Statistics last updated on your Table"
 

Copyright © 2009-2011 All Rights Reserved for SQLServerCurry.com by Suprotim Agarwal | Terms and Conditions