Articles

Page 3 of 10 — showing articles 37 to 54 of 179

Closest Match with Sort Rewinds

Closely Matched with Rewinds

A SQL Server sort operator can replay its results, but only when the sort operates on at most one row. This article employs a sort to avoid a table spool in a query designed to find the closest match to a given value in a second table.

When Do SQL Server Sorts Rewind?

Re-e-wind

The rare circumstances when a SQL Server sort operator inside a nested loop can rewind (replay) cached results to avoid re-executing child plan operators.

SQL Server 2019 Aggregate Splitting

Splitting in Progress

Exploring a new query optimizer exploration rule in SQL Server 2019 can split large batch mode hash aggregates to avoid or reduce spilling to tempdb.

How MAXDOP Really Works

Processors at Work

A MAXDOP n hint does not limit a SQL Server execution plan to using a maximum of n CPU cores concurrently 🤯

Finding Distinct Values Quickly

Japanese Water Garden

A few different ways to retrieve distinct values from a table, including some big "it just runs faster" wins in SQL Server 2019.

Batch Mode Bitmap Demos

Bitmap

Demo scripts for SQL Server batch mode hash bitmap selectivity estimates. Simple and complex bitmap types. Compiled and compressed bitmaps.

Batch Mode Bitmaps in SQL Server

Bitmap

A deep dive into SQL Server batch mode bitmaps revealing undocumented details that can greatly impact performance.

Apply versus Nested Loops Join

Nested Loops

Understanding the differences between SQL Server APPLY and nested loops joins, including details of query optimizer transformations.