 |
| |
[08/26/2011]
SQL Server: When were table indexes last updated
By: Mark Jacobsen
Performance problems in databases can often be traced back to poor indexes or indicies that haven't been updated to properly reflect the changes in data over time. To check the last time an index was updated in SQL Server, you can query some system tables to get the information needed. Play around with variations of the following...
SELECT o.name AS Table_Name
,i.name AS Index_Name
,STATS_DATE(o.id,i.indid) AS Date_Updated
FROM sysobjects o JOIN
sysindexes i ON i.id = o.id
WHERE xtype = 'U' AND
i.name IS NOT NULL
ORDER BY STATS_DATE(o.id,i.indid)
===================
Mark Jacobsen: I hope you have found this article or tip helpful. If so, please consider making a donation. 100% of all proceeds will be directed to charity: water.
Contact me at MarkJacobsen.net or @MarkJacobsen
|
|
 |
Thanks for stopping by. Please be sure to visit some of my sites for your communication needs: Toll Free Virtual PBX, Real Estate Call Capture, Hosted PBX, and Virtual Fax.
All News Articles...
|
|