patternsqlModerate
Why set Auto Update Statistics to False?
Viewed 0 times
whyupdateautofalsestatisticsset
Problem
I've just inherited about 20 instances of SQL Server, as part of a wider acquisition project. I'm in the process of assessing performance and I don't like the way maintenance plans have been implemented.
I'm seeing daily blanket index rebuilds (I can deal with this one) and also daily manual updating of statistics.
Around half of the databases have been set to Auto Update Statistics = False, for reasons which are not clear other than I am told it is to reduce 'Performance Issues'...
I always thought, and worked to, best practice of setting this to True and felt the Manual Update was not necessary if this setting was True. Am I wrong?
Can anyone explain what the benefit would be in having this set as False, but doing a daily manual update instead?
I should mention that some of the databases are highly transactional (millions of Inserts, Deletes, Updates per day) Others are low in terms of transaction rates, and some are all but read-only. There is no rhyme or reason though as to which have the Auto Update setting set to False. It appears to be a lottery.
I'm seeing daily blanket index rebuilds (I can deal with this one) and also daily manual updating of statistics.
Around half of the databases have been set to Auto Update Statistics = False, for reasons which are not clear other than I am told it is to reduce 'Performance Issues'...
I always thought, and worked to, best practice of setting this to True and felt the Manual Update was not necessary if this setting was True. Am I wrong?
Can anyone explain what the benefit would be in having this set as False, but doing a daily manual update instead?
I should mention that some of the databases are highly transactional (millions of Inserts, Deletes, Updates per day) Others are low in terms of transaction rates, and some are all but read-only. There is no rhyme or reason though as to which have the Auto Update setting set to False. It appears to be a lottery.
Solution
This is too long for a comment so I'll chime in with another case where one might want to turn off auto update stats. I've worked with databases supporting high-volume OLTP workloads and a stringent query performance SLA in milliseconds. Nearly all queries were trivial with a lot of attention to query and index tuning detail and some of the tables were quite large. There wasn't much value in updating stats during peak periods in this situation and auto-update stats would violate the SLA. Consequently, maintenance was done during non-peak periods via a scheduled job.
Another option is to turn on both
Another option is to turn on both
AUTO_UPDATE_STATISTICS and AUTO_UPDATE_STATISTICS_ASYNC database options. This will allow queries to proceed with execution plans based on stale statistics rather than incur the overhead of updating stats synchronously. This is especially appropriate for an OLTP workload as long as the server is sized to accommodate the query workload plus the background stats update.Context
StackExchange Database Administrators Q#137472, answer score: 13
Revisions (0)
No revisions yet.