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
No comments:
Post a Comment