patternsqlModerate
Reasons for disabling statistics auto update?
Viewed 0 times
updateautostatisticsforreasonsdisabling
Problem
I just learned that a client company I work for has decided to keep the auto update statistics options off for some of their SQL Servers, and the DBAs manually troubleshooting performance issues when they arise.
However, this kind of does of not make sense to me. Why would you want to prevent the statistics from being updated?
However, this kind of does of not make sense to me. Why would you want to prevent the statistics from being updated?
Solution
My advice:
How often you need to run index maintenance/rebuild stats depends on your database load, specifically how often your data is modified (i.e.
- Leave 'auto update stats' on (until you run into a very good reason not to) - you don't want a big delete in middle of a day to throw off query plans until the next time you run maintenance.
- However, schedule index maintenance/update statistics at a quiet time.
sp_updatestatswill update all stats for all tables in a database for you, but that will also cause stored proc recompiles, so choose your time carefully (i.e.sp_updatestatsright before your end-of-month reporting is probably suboptimal).
How often you need to run index maintenance/rebuild stats depends on your database load, specifically how often your data is modified (i.e.
INSERT/UPDATE/DELETE). If you're modifying data all over the show (i.e. a staging table for a weekly batch process), you probably want to update stats/reorganize indexes nightly. If your data is rather more static you can probably make it a weekly or fortnightly schedule.Context
StackExchange Database Administrators Q#8708, answer score: 11
Revisions (0)
No revisions yet.