Ola Hallengren adds STATISTICS support to his solution

Last week, Ola published a very useful update to his Backup, Integrity Check and Index Optimization scripts: the solution now supports updating statistics.  There are several options, such as only updating when the data has been modified and using the RESAMPLE and NORECOMPUTE options.  An example call:

 EXEC dbo.IndexOptimize 'USER_DATABASES',
     @FragmentationHigh_LOB      = 'INDEX_REBUILD_OFFLINE',
     @FragmentationHigh_NonLOB   = 'INDEX_REBUILD_ONLINE',
     @FragmentationMedium_LOB    = 'INDEX_REORGANIZE_STATISTICS_UPDATE',
     @FragmentationLow_LOB       = 'STATISTICS_UPDATE',
     @FragmentationLow_NonLOB    = 'STATISTICS_UPDATE',
     @UpdateColumnStatistics     = 'Y',
     @OnlyModifiedStatistics     = 'Y';

If you haven't already tried Ola's maintenance solution, I highly suggest you check it out.

Aaron Bertrand

I am a passionate technologist with industry experience dating back to Classic ASP and SQL Server 6.5. I am a long-time Microsoft MVP, write at Simple Talk, SQLPerformance, and MSSQLTips, and have had the honor of speaking at more conferences than I can remember. In non-tech life, I am a father of two, a huge hockey and football fan, and my pronouns are he/him. If I've helped you out, consider thanking me with a coffee. :-)