How to Check when Index was Last Rebuilt ?
How to get the last index rebuild date?
select STATS_DATE ( object_id , stats_id )
from sys.stats
SELECT name AS index_name,OBJECT_NAME(OBJECT_ID) as OBJECTName,
STATS_DATE(object_id, stats_id) AS LastIndexBuild_date
FROM sys.stats
where name not like'%_WA_%'
order by LastIndexBuild_date desc;
SELECT 'Index Name' = i.name,
STATS_DATE(i.object_id, i.index_id) as STATSDATE
FROM sys.objects o
JOIN sys.indexes i
ON o.object_id = i.object_id;