Articles

Page 2 of 11 — showing articles 19 to 36 of 188

Setting a Fixed Size for Transaction Log VLFs

Fixed Size Logs

Wouldn't it be nice not to have to worry about the virtual log file sizes SQL Server creates? There's an undocumented procedure in SQL Server 2022 to achieve this. Though currently unsupported, maybe this facility will become available in a future version.

Why Batch Mode Sort Spills Are So Slow

Glacially Slow

A deep dive into why SQL Server batch mode sorts can be so slow when they spill—much slower than the equivalent row mode sort. Includes many other internal details of row and batch mode sorting.

Fast Key Optimization for Row Mode Sorts

Very Fast Keys

Details of an internal optimization SQL Server uses to speed up row mode sorts.

The optimization is only available for a small number of sort key data types.

Importing a File in Batches

Piece by Piece

An efficient technique to batch bulk load structured data from a file into multiple tables on the server. Allows for server-side identity columns and foreign key relationships involving those identity values.

The Lock Escalation Threshold—Part 1

Lock Escalation

How and when lock escalation is triggered in SQL Server, clarifying misleading information you may have seen in official documentation and other sources.

More Consistent Execution Plan Timings in SQL Server 2022

Inconsistent Timing

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.

The Adaptive Join Threshold

Threshold Problems

How an adaptive join decides to use a batch mode hash join or row mode apply. Includes details of the threshold calculation.