SQL Server :- Get Statistics Of All Objects Of A Database In SQL Server

With the help of  Below Query you are able to find the details about Statistics of a database in SQL Server, It also provides the last Statistics updated dates and time of an object.


select si.id as 'ObjectID', isnull(si.name,'Heap') as 'IndexName', so.name as 'TableName',
stats_date (id,indid) as stats_last_updated_Date
from sys.sysindexes as si
inner join sys.objects as so
on si.id = so.object_id
where so.type = 'U'

Output:-

Leave a Reply

Your email address will not be published. Required fields are marked *