The Lock Escalation Threshold—Part 1
How and when lock escalation is triggered in SQL Server, clarifying misleading information you may have seen in official documentation and other sources.
How and when lock escalation is triggered in SQL Server, clarifying misleading information you may have seen in official documentation and other sources.
How to reduce contention on the NESTING TRANSACTION FULL
latch in SQL Server 2019 using an undocumented trace flag.
Simplification, trivial plans, parameter safety, and parallelism. Includes a flowchart of the whole simple parameterization process.
Modern execution plans can contain a mixture of batch mode and row mode operators, with each mode exposing timings in a different way. SQL Server 2022 contains an improvement that is currently hidden behind a trace flag.
How the early SQL Server plan compilation process interacts with simple parameterization, including decoding and constant folding.
How the SQL Server parser interacts with simple parameterization.
The often contradictory information shown in execution plans about simple parameterization.
The quriky rules for data type assignment during simple parameterization.
Shell plans, plan stubs and how to cache only prepared plans (not ad-hoc).
The parameter embedding optimization enabled by a RECOMPILE
query hint doesn't always work to your advanatge when large objects are involved.
How an adaptive join decides to use a batch mode hash join or row mode apply. Includes details of the threshold calculation.
Foreign key blocking under read committed snapshot isolation and related update conflicts under snapshot isolation.
Why you can sometimes see two sequential Parallelism operators in SQL Server execution plans.
How additional parallel tasks cooperate to complete plan execution, including returning rows to the client.
Exchange synchronization, CXPACKET
waits, and parallel task opening.
Starting the query scan, "early phases" processing, and starting the first parallel tasks.
Iterative execution, invisible plan performance profilers, and how the top-level query scan begins.
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.