获取SQL Server索引重建时间

  • 查询SQL Server Index上次Rebuild时间的方法

    要查询SQL Server Index上次Rebuild时间,可以使用以下SQL语句:,,``sql,SELECT OBJECT_NAME(s.[object_id]) AS TableName, i.name AS IndexName, MAX(i.modify_date) AS LastRebuildDate,FROM sys.dm_db_index_usage_stats AS s,JOIN sys.indexes AS i ON s.[object_id] = i.[object_id] AND s.index_id = i.index_id,WHERE OBJECTPROPERTY(s.[object_id], 'IsUserTable') = 1,GROUP BY OBJECT_NAME(s.[object_id]), i.name,ORDER BY TableName, IndexName;,``

    2024年5月20日
    090
免备案 高防CDN 无视CC/DDOS攻击 限时秒杀,10元即可体验  (专业解决各类攻击)>>点击进入