“How to find outdated Statistics ?” is an old topic being discussed on different forums but what encourages me to write this article is the way we usually find outdated statistics using sys.sysindexes will be obsolete soon.
As per MSDN sys.sysindexes will be removed in the future version of Microsoft SQL Server. Avoid using this feature in new development work.
Given below are both approaches.
Old Approach using sys.sysindexes :
Given below is an old approach using sys.sysindexes to find the outdated statistics of tables.
In the given below script, I filtered all the statistics those are updated the previous day or the day before and their actual data is being modified.
New Approach Using sys.dm_db_stats_properties :
Given below is the new approach using sys.dm_db_stats_properties and sys.stats to find the outdated statistics of tables.
In the given below script, I filtered all the statistics those are updated the previous day or…
View original post 47 more words