Thursday, 21 June 2018

How to check table update stats for particular table or object

SELECT OBJECT_NAME(object_id) AS [ObjectName]
      ,[name] AS [StatisticName]
      ,STATS_DATE([object_id], [stats_id]) AS [StatisticUpdateDate]
FROM sys.stats
where OBJECT_NAME(object_id) in ('tablename')
order by STATS_DATE([object_id], [stats_id]) desc

No comments:

Post a Comment

CPU queries in SQL server

-- Database Wise CPU Utilization report -- CPU_Time(Ms): CPU Time in Milliseconds -- CPUPercent: Let’s say this instance is using 50% CP...