Thursday 6 March 2014

Update Statistics Useful Scripts

Script to find out the statistics update date for all the indexes in the current database
1
   
sp_MSforeachtable 'sp_autostats "?"'

Script to update the statistics of all the indexes
1
   
EXEC sp_MSforeachtable 'UPDATE STATISTICS ? WITH FULLSCAN'

No comments:

Post a Comment