Monday 18 February 2013

Update Statistics Useful Scripts

Script to find out the statistics update date for all the indexes in the current database

1sp_MSforeachtable 'sp_autostats "?"'

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

 

No comments:

Post a Comment