<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Sp_updatestats on SQL Server Scripts</title><link>https://www.sqlserver70.com/tags/sp_updatestats/</link><description>Recent content in Sp_updatestats on SQL Server Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>SQLServer70.com</copyright><lastBuildDate>Wed, 17 Jun 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.sqlserver70.com/tags/sp_updatestats/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Update Statistics in SQL Server</title><link>https://www.sqlserver70.com/post/sql-server-update-statistics-guide/</link><pubDate>Wed, 17 Jun 2026 00:00:00 +0000</pubDate><guid>https://www.sqlserver70.com/post/sql-server-update-statistics-guide/</guid><description>
&lt;p&gt;A query that ran in milliseconds last month now scans a million rows and spills to tempdb. Nothing changed in the code — but the data grew, and the statistics the optimizer relies on went stale, so its row estimates drifted far from reality and it chose a bad plan. Refreshing statistics is the fix, and knowing how and when to do it is core DBA work.&lt;/p&gt;
&lt;script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1012089347386563"
crossorigin="anonymous"&gt;&lt;/script&gt;
&lt;ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-1012089347386563"
data-ad-slot="8593449130"&gt;&lt;/ins&gt;
&lt;script&gt;
(adsbygoogle = window.adsbygoogle || []).push({});
&lt;/script&gt;
&lt;h2 id="purpose-and-overview"&gt;Purpose and Overview&lt;/h2&gt;
&lt;p&gt;SQL Server's query optimizer is cost-based: it estimates how many rows each operator will process and picks a plan accordingly. Those estimates come from statistics objects — histograms and density vectors that describe the distribution of values in a column or index. When data changes but statistics do not, estimates degrade, and the optimizer can choose nested loops where a hash join belongs, or under-size a memory grant.&lt;/p&gt;</description></item></channel></rss>