TSQL to get an index age in a database
SELECT
‘Index Name’ = ind.name,
‘Statistics Date’ = STATS_DATE(ind.object_id, ind.index_id)
FROM
SYS.INDEXES ind
WHERE
OBJECT_NAME(ind.object_id) = ‘Table_Name’
Comments
Anonymous comments are disabled
About SQL Master
**__________________________________**
SQL Server MVP, Sr. DBA & industry expert.
-
Knowledge is of two kinds. We know a subject ourselves or we know where we can find information on it. It is also a power and you will gain by sharing it.