<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SQL Server Performance on SQL Server Scripts</title><link>https://www.sqlserver70.com/categories/sql-server-performance/</link><description>Recent content in SQL Server Performance on SQL Server Scripts</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>SQLServer70.com</copyright><lastBuildDate>Sat, 28 Feb 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://www.sqlserver70.com/categories/sql-server-performance/index.xml" rel="self" type="application/rss+xml"/><item><title>SQL Server Missing Indexes Report: dm_db_missing_index</title><link>https://www.sqlserver70.com/post/sql-server-missing-indexes-report-sys-dm-db-missing-index-details/</link><pubDate>Sat, 28 Feb 2026 00:00:00 +0000</pubDate><guid>https://www.sqlserver70.com/post/sql-server-missing-indexes-report-sys-dm-db-missing-index-details/</guid><description>
&lt;p&gt;SQL Server tracks index recommendations automatically as queries execute, storing them in the missing index DMVs. This T-SQL script queries those views to produce a ranked report of missing indexes, ordered by the estimated improvement they would provide, along with a ready-to-run &lt;code&gt;CREATE INDEX&lt;/code&gt; statement for each recommendation.&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;Every time SQL Server executes a query that would benefit from an index that does not exist, it records the recommendation in &lt;code&gt;sys.dm_db_missing_index_details&lt;/code&gt;. Over time these recommendations accumulate and can reveal the highest-impact indexing changes you can make to improve query performance.&lt;/p&gt;</description></item><item><title>SQL Server Wait Statistics Report: dm_os_wait_stats</title><link>https://www.sqlserver70.com/post/sql-server-wait-statistics-report-sys-dm-os-wait-stats/</link><pubDate>Fri, 27 Feb 2026 00:00:00 +0000</pubDate><guid>https://www.sqlserver70.com/post/sql-server-wait-statistics-report-sys-dm-os-wait-stats/</guid><description>
&lt;p&gt;Wait statistics are one of the most reliable ways to identify performance bottlenecks in SQL Server. This T-SQL script queries &lt;code&gt;sys.dm_os_wait_stats&lt;/code&gt;, filters out background and idle wait types that do not indicate real problems, and ranks the remaining waits by their percentage of total wait time.&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;Every time SQL Server cannot immediately process a request — because it is waiting for CPU, disk, memory, locks, or network — it records that wait in &lt;code&gt;sys.dm_os_wait_stats&lt;/code&gt;. Over time this DMV accumulates a comprehensive picture of where SQL Server spends time waiting.&lt;/p&gt;</description></item><item><title>SQL Server UPDATE STATISTICS and SELECT Dynamic Scripts</title><link>https://www.sqlserver70.com/post/sql-server-dynamic-update-statistics-and-select-scripts/</link><pubDate>Wed, 06 Aug 2025 00:00:00 +0000</pubDate><guid>https://www.sqlserver70.com/post/sql-server-dynamic-update-statistics-and-select-scripts/</guid><description>
&lt;h2 id="sql-server-dynamic-update-statistics-and-select-scripts-for-database-maintenance"&gt;SQL Server Dynamic Update Statistics and Select Scripts for Database Maintenance&lt;/h2&gt;
&lt;h2 id="purpose"&gt;Purpose&lt;/h2&gt;
&lt;p&gt;These SQL Server scripts are designed to automatically generate database maintenance commands by dynamically creating UPDATE STATISTICS statements and SELECT queries for all user tables in a database. This approach is particularly useful for database administrators who need to perform bulk operations across multiple tables without manually writing individual commands for each table.
&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;/p&gt;</description></item></channel></rss>