Articles

Page 3 of 11 — showing articles 37 to 54 of 188

How Parallel Plans Start Up—Part 1

Start 1

The role of the parent task (coordinator) in preparing a plan for parallel execution. Includes initializing each operator and adding hidden profilers to collect runtime performance data such as row count and elapsed time.

SQL Server batch text hash and the sql_handle

Getting a Handle on Batch Text

Describes the structure of a sql_handle and explains how the SQL Server batch text hash component is calculated. Provides T-SQL functions to replicate the calculations.

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.