The following query will fetch the index creation date.
SELECT name AS IndexName, STATS_DATE(OBJECT_ID,index_id) AS Creation_Date, OBJECT_NAME(OBJECT_ID) AS ‘TableName’
FROM sys.indexes WHERE name like ‘%index_name%’
Advertisement
The following query will fetch the index creation date.
STATS_DATE() – when stats for the specified index were last updated
so, it’s not correct script.