<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>AI on Rudi Bruchez</title><link>https://www.pachadata.com/en/tags/ai/</link><description>Recent content in AI on Rudi Bruchez</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 21 Oct 2026 18:46:32 +0200</lastBuildDate><atom:link href="https://www.pachadata.com/en/tags/ai/index.xml" rel="self" type="application/rss+xml"/><item><title>Analyzing the Query Store with an AI agent</title><link>https://www.pachadata.com/en/docs/articles/sql-server/performance/query-store-agent/</link><pubDate>Wed, 21 Oct 2026 00:00:00 +0000</pubDate><guid>https://www.pachadata.com/en/docs/articles/sql-server/performance/query-store-agent/</guid><description>&lt;p&gt;&lt;em&gt;Co-written with Claude, who ran the lab tests and part of the research.&lt;/em&gt;&lt;/p&gt;&#10;&lt;div class="alert alert-success" role="alert"&gt;&lt;div class="h4 alert-heading" role="heading"&gt;TL;DR&lt;/div&gt;&#10;&lt;p&gt;Searching the Query Store by hand, query by query, takes hours. A command-line agent (Claude Code, Codex) does it on its own if it has &lt;code&gt;sqlcmd&lt;/code&gt; and a dedicated login that holds only &lt;code&gt;VIEW DATABASE STATE&lt;/code&gt; in each database: it reads the query texts, the plans and the runtime statistics, and gets error 229 on any table. For more caution, &lt;code&gt;DBCC CLONEDATABASE&lt;/code&gt; produces a copy without data that contains the Query Store, to restore on another instance.&lt;/p&gt;&#10;&lt;p&gt;The Query Store does not keep everything. In &lt;code&gt;AUTO&lt;/code&gt; capture mode, an ad hoc query is only recorded from 30 executions or a certain cost onward: in my measurements, a read of the whole &lt;code&gt;Contact.Contact&lt;/code&gt; table (120,140 rows) split into 25 queries left no trace. A query run from &lt;code&gt;master&lt;/code&gt; or &lt;code&gt;tempdb&lt;/code&gt; is recorded nowhere, and a &lt;code&gt;TRUNCATE TABLE&lt;/code&gt; never is. The agent only finds what the Query Store kept.&lt;/p&gt;&#10;&lt;/div&gt;</description></item></channel></rss>