SELECT OBJECT_NAME(tbl.object_id),
'Index Name' = ind.name ,
'Statistics Date' = STATS_DATE(ind.object_id, ind.index_id)
FROM SYS.INDEXES ind
INNER JOIN SYS.TABLES tbl
ON tbl.OBJECT_ID = ind.object_id
WHERE tbl.TYPE = 'U'
--USE babu;
--GO
--EXEC sp_updatestats --To update all STATISTICS in the DB
No comments:
Post a Comment