Remove introduction-to-nested-loop-joins-in-sql-server
article thumbnail

Nested Loops Joins and Performance Spools

SQL Performance

Introduction. Performance spools are lazy spools added by the optimizer to reduce the estimated cost of the inner side of nested loops joins. Just before we get started, I want to stress an important point: There are two distinct types of nested loop join in execution plans. Nested Loops Join.

article thumbnail

The Adaptive Join Threshold

SQL Performance

First introduced in SQL Server 2017 Enterprise Edition, an adaptive join enables a runtime transition from a batch mode hash join to a row mode correlated nested loops indexed join (apply) at runtime. Introduction.

Servers 98
Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

The Eager Index Spool and The Optimizer

SQL Performance

Introduction. To be accessed more than once, the spool must appear on the inner side of a nested loops join operator. Each iteration of the loop should seek to a particular index spool key value provided by the outer side of the loop. That means that the join needs to be an apply , not a nested loops join.

Servers 77
article thumbnail

When Do SQL Server Sorts Rewind?

SQL Performance

Introduction. Rewinds are specific to operators on the inner side of a nested loops join or apply. Its raison d’être is to cache result rows from a plan subtree, then replay those rows on subsequent iterations if any correlated loop parameters are unchanged. Row Count Spool. Nonclustered Index Spool. Sort types.

Servers 106