List all the statistics with their last updated date in a database
SELECT name AS StatisticsName,
STATS_DATE(OBJECT_ID, stats_id) AS StatisticsUpdateDate,
OBJECT_NAME(OBJECT_ID) as ObjectName
FROM sys.stats
WHERE OBJECTPROPERTYEX(OBJECT_ID,'IsMSShipped') = 0
SELECT name AS StatisticsName,
STATS_DATE(OBJECT_ID, stats_id) AS StatisticsUpdateDate,
OBJECT_NAME(OBJECT_ID) as ObjectName
FROM sys.stats
WHERE OBJECTPROPERTYEX(OBJECT_ID,'IsMSShipped') = 0
No comments:
Post a Comment