A customer this week inquired about auto updating of statistics in Sql 2005, particularly with regards to how and what the new AUTO_UPDATE_STATISTICS_ASYNC option is and how it works…well, here you have it…
With Sql Server 2005, the AUTO_UPDATE_STATISTICS_ASYNC option configures a given database to update statistics asynchronously vs. synchronously (as occurs without the option enabled, or in Sql 2000 as well). Typically, if a given query request triggers an auto stat updating event without this option set, the query will wait as stats are updated, then the query will be executed. If you set this option however, the query will be executed against the old/existing stats, while submitting a request of sorts in the background telling the engine to update the stats automatically as soon as possible, without holding up the existing query request(s). As soon as the background operation completes, new query requests will begin to use the new statistics information. One thing to note in particular is that this option only comes in to play for auto updating of stats, not manual updating or on-demand updating on request by a user.
In many scenarios, this option can be enabled with little risk to negative side-effects that stale-statistics can often cause (poor query plans for example)…if your data distribution and workload typically have little impact on overall data distribution numbers, row counts and sizes, etc., then it is probably a great candidate for seeing nothing but improved throughput with this option enabled.

Chad is an Architect, Administrator, and Developer with technologies such as Sql Server (and related technologies), .NET, Windows Server, and the Microsoft Clustering stack (MSCS, NLB, HPC). After nearly 5 years at Microsoft in a variety of roles related to pushing the limits of the Microsoft stack in many of the largest, most complex Sql Server installations in the world, he now provides consulting to many different customers and clients ranging from startup to Fortune 50. Most recently he has been spending much of his time as an architect at SpruceMedia, Inc., a startup firm in the Facebook/Social Advertising space (http://sprucemedia.com) and resides in the Redmond, WA area where he also spends a significant amount of time writing, talking, presenting and blogging about the data-related technologies on the Microsoft stack. Chad regularly posts Sql Server related content, tools, and advice with the MSSQLTips team and on stackoverflow.com at http://stackoverflow.com/users/169012/chadhoc. Chad can be contacted via email at chad dot boyd dot tips at gmail dot com.


