<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Reference on Rudi Bruchez</title><link>https://www.pachadata.com/en/docs/reference/</link><description>Recent content in Reference on Rudi Bruchez</description><generator>Hugo</generator><language>en</language><atom:link href="https://www.pachadata.com/en/docs/reference/index.xml" rel="self" type="application/rss+xml"/><item><title>SQL Server trace flags</title><link>https://www.pachadata.com/en/docs/reference/trace-flags/</link><pubDate>Wed, 02 Dec 2026 00:00:00 +0000</pubDate><guid>https://www.pachadata.com/en/docs/reference/trace-flags/</guid><description>&lt;p&gt;&lt;em&gt;Page co-written with Claude, who gathered the documentation and checked the output of the undocumented flags.&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;A trace flag changes an engine behavior, for the instance, the session, or a single query.&#10;Since SQL Server 2016 SP1, several optimizer flags have a &lt;code&gt;USE HINT&lt;/code&gt; equivalent, which is&#10;better: its name says what it does, and it does not require the &lt;code&gt;sysadmin&lt;/code&gt; role. The&#10;undocumented flags in the last section are for observing the optimizer on a test instance,&#10;never in production.&lt;/p&gt;&#10;&lt;/div&gt;</description></item><item><title>SQL Server engine constants</title><link>https://www.pachadata.com/en/docs/reference/engine-constants/</link><pubDate>Wed, 02 Dec 2026 00:00:00 +0000</pubDate><guid>https://www.pachadata.com/en/docs/reference/engine-constants/</guid><description>&lt;p&gt;&lt;em&gt;Page co-written with Claude, who collected the sources and ran the measurements.&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;The fixed engine numbers people look up most often, with their version and source: the&#10;Microsoft documentation page that gives them, or the measurement that checks them on&#10;SQL Server 2022 CU26 and 2025 CU11. When a measurement contradicts the documentation, the page says so.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;h2 id="how-to-read-these-tables"&gt;How to read these tables&lt;/h2&gt;&#10;&lt;p&gt;Each row gives a fixed engine value, hard-coded or default, and its source. The link points&#10;to the Microsoft documentation page that gives it. &amp;ldquo;Measured&amp;rdquo; means that I checked it on two&#10;lab instances, SQL Server 2022 CU26 and SQL Server 2025 CU11, both on Linux. The measurement&#10;scripts are at the end of the page.&lt;/p&gt;</description></item><item><title>The estimator's fixed guesses</title><link>https://www.pachadata.com/en/docs/reference/fixed-guesses/</link><pubDate>Wed, 02 Dec 2026 00:00:00 +0000</pubDate><guid>https://www.pachadata.com/en/docs/reference/fixed-guesses/</guid><description>&lt;p&gt;&lt;em&gt;Page co-written with Claude, who ran the measurements on both instances.&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;Without a usable histogram, the optimizer applies a fixed selectivity: 30% for an&#10;inequality, 9% for a range, 10% for the equality of two columns. The new estimator and the&#10;legacy one differ mostly on equality, &lt;code&gt;&amp;lt;&amp;gt;&lt;/code&gt;, &lt;code&gt;LIKE&lt;/code&gt; and the combination of several&#10;predicates. The tables below give each value measured on 100,000 rows.&lt;/p&gt;&#10;&lt;/div&gt;&#10;&lt;h2 id="the-fixed-guess"&gt;The fixed guess&lt;/h2&gt;&#10;&lt;p&gt;To estimate the number of rows a filter lets through, the optimizer usually reads the&#10;histogram of a statistic on the column. When it has none, or cannot use it, it takes the&#10;density of the statistic when that is enough (an equality on a variable), and otherwise a&#10;fixed selectivity written in the engine&amp;rsquo;s code: a &lt;em&gt;guess&lt;/em&gt;, which I give here with its value&#10;(&amp;ldquo;the 30% guess&amp;rdquo;).&lt;/p&gt;</description></item><item><title>Intelligent Query Processing in Standard edition</title><link>https://www.pachadata.com/en/docs/reference/iqp/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://www.pachadata.com/en/docs/reference/iqp/</guid><description>&lt;h2 id="iqp-features-table"&gt;IQP Features Table&lt;/h2&gt;&#10;&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-us/sql/sql-server/editions-and-components-of-sql-server-2022#intelligent-query-processing"&gt;Reference&lt;/a&gt;&lt;/p&gt;&#10;&lt;table&gt;&#10;&#9;&lt;thead&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th&gt;Features&lt;/th&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;th style="text-align: center"&gt;Standard&lt;/th&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/thead&gt;&#10;&#9;&lt;tbody&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&#10;&lt;code style="background-color: green;"&gt; &#10; &lt;span style="&#10; color: green;&#10; filter: grayscale(1) invert(1) contrast(100);&#10; "&gt;&#10; Approximate count distinct&#10; &lt;/span&gt;&#10;&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td style="text-align: center"&gt;Yes&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&#10;&lt;code style="background-color: green;"&gt; &#10; &lt;span style="&#10; color: green;&#10; filter: grayscale(1) invert(1) contrast(100);&#10; "&gt;&#10; Approximate percentile&#10; &lt;/span&gt;&#10;&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td style="text-align: center"&gt;Yes&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Automatic tuning&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td style="text-align: center"&gt;No&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Batch mode adaptive joins&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td style="text-align: center"&gt;No&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Batch mode memory grant feedback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td style="text-align: center"&gt;No&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Batch mode on rowstore&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td style="text-align: center"&gt;No&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Cardinality estimate feedback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td style="text-align: center"&gt;No&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Degree of parallelism feedback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td style="text-align: center"&gt;No&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&#10;&lt;code style="background-color: green;"&gt; &#10; &lt;span style="&#10; color: green;&#10; filter: grayscale(1) invert(1) contrast(100);&#10; "&gt;&#10; Interleaved execution for multi-statement table valued functions&#10; &lt;/span&gt;&#10;&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td style="text-align: center"&gt;Yes&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Memory grant feedback persistence and percentile&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td style="text-align: center"&gt;No&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&#10;&lt;code style="background-color: green;"&gt; &#10; &lt;span style="&#10; color: green;&#10; filter: grayscale(1) invert(1) contrast(100);&#10; "&gt;&#10; Optimized plan forcing&#10; &lt;/span&gt;&#10;&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td style="text-align: center"&gt;Yes&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&#10;&lt;code style="background-color: green;"&gt; &#10; &lt;span style="&#10; color: green;&#10; filter: grayscale(1) invert(1) contrast(100);&#10; "&gt;&#10; Parameter sensitive plan optimization&#10; &lt;/span&gt;&#10;&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td style="text-align: center"&gt;Yes&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;Row mode memory grant feedback&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td style="text-align: center"&gt;No&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&#10;&lt;code style="background-color: green;"&gt; &#10; &lt;span style="&#10; color: green;&#10; filter: grayscale(1) invert(1) contrast(100);&#10; "&gt;&#10; Scalar UDF inlining&#10; &lt;/span&gt;&#10;&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td style="text-align: center"&gt;Yes&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&#9;&#9;&lt;tr&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td&gt;&#10;&lt;code style="background-color: green;"&gt; &#10; &lt;span style="&#10; color: green;&#10; filter: grayscale(1) invert(1) contrast(100);&#10; "&gt;&#10; Table variable deferred compilation&#10; &lt;/span&gt;&#10;&lt;/code&gt;&lt;/td&gt;&#10;&#9;&#9;&#9;&#9;&#9;&lt;td style="text-align: center"&gt;Yes&lt;/td&gt;&#10;&#9;&#9;&#9;&lt;/tr&gt;&#10;&#9;&lt;/tbody&gt;&#10;&lt;/table&gt;&#10;&lt;!-- ## Enable and Disable IQP --&gt;</description></item></channel></rss>