<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Statistics on Andy M Mallon - AM²</title><link>https://am2.co/category/statistics/</link><description>Recent content in Statistics on Andy M Mallon - AM²</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Thu, 29 Aug 2024 11:19:07 -0400</lastBuildDate><atom:link href="https://am2.co/category/statistics/index.xml" rel="self" type="application/rss+xml"/><item><title>Not all stats should be auto-updated</title><link>https://am2.co/2024/08/29/not-all-stats-should-be-auto-updated/</link><pubDate>Thu, 29 Aug 2024 11:19:07 -0400</pubDate><guid>https://am2.co/2024/08/29/not-all-stats-should-be-auto-updated/</guid><description>&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=CO__LF_m_O8"&gt;&lt;img src="https://am2.co/wp-content/uploads/StatsDog-300x300.png" alt="" width="300" height="300" class="alignright size-medium wp-image-53810" /&gt;&lt;/a&gt;Statistics auto-updates are generally a good thing&amp;ndash;auto-update of &lt;a href="https://learn.microsoft.com/en-us/sql/relational-databases/statistics/statistics?view=sql-server-ver16" rel="noopener" target="_blank"&gt;statistics&lt;/a&gt; is the default behavior in SQL Server. Having the freshest information about the data &amp;ldquo;shape&amp;rdquo; helps to inform the best selection of an execution plan for queries.&lt;/p&gt;&#10;&lt;h2 id="except-for-when-it-doesnt"&gt;Except for when it doesn&amp;rsquo;t.&lt;/h2&gt;&#10;&lt;h3 id="because-it-depends"&gt;Because It Depends™️&lt;/h3&gt;&#10;&lt;p&gt;Let&amp;rsquo;s talk about the trade-offs.&lt;/p&gt;</description></item><item><title>sp_autostats: object-level auto update statistics</title><link>https://am2.co/2015/12/15/sp_autostats/</link><pubDate>Tue, 15 Dec 2015 11:00:00 -0500</pubDate><guid>https://am2.co/2015/12/15/sp_autostats/</guid><description>&lt;p&gt;In SQL Server, auto-update statistics is a database level setting. It&amp;rsquo;s right  there:&lt;/p&gt;&#10;&lt;p&gt;&lt;a href="https://am2.co/wp-content/uploads/2015/12/sp_autostats1.png" rel="attachment wp-att-249"&gt;&lt;img class="alignnone wp-image-249 size-full" src="https://am2.co/wp-content/uploads/2015/12/sp_autostats1.png" alt="Auto Update Statistics" width="901" height="200" /&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;p&gt;I&amp;rsquo;m not going to say whether I think Auto Update Statistics should be on or off. Instead, I&amp;rsquo;m going to argue that there are definitely scenarios when you want to have this on AND there are scenarios where you want it turned off. Can you really have this both ways? Absolutely.&lt;/p&gt;</description></item></channel></rss>