Page Free Space

SQL Server internals by Paul White

Tuesday, 1 April 2025

My Content has Moved!

›
I have now rehosted on www.sql.kiwi . You'll find pretty much everything I've ever written there, whether it was originally publishe...
Tuesday, 17 September 2024

Why a Self-Join Requires Halloween Protection

›
This article was originally published on 𝕏. I was asked recently why Halloween Protection was needed for data modification statements tha...
Sunday, 15 September 2024

Current State of the ANY Aggregate Transformation

›
This article was originally published on 𝕏. SQL Server provides a way to select any one row from a group of rows, provided you write the...
Friday, 13 September 2024

A Small Sample of SQL Server Chaos

›
This article was originally published on 𝕏. Background Since SQL Server indexed views don’t allow MIN or MAX aggregates, I recently fo...
Friday, 30 August 2024

A Nonclustered Index Update Disaster

›
This article was originally published on 𝕏. Introduction Update execution plans are not something the T-SQL statement writer has much co...
Monday, 12 August 2024

Don't Mix with Datetime

›
This article was originally published on 𝕏. Introduction Microsoft encourages us not to use the datetime data type: Avoid using date...
Thursday, 20 June 2024

SQL Server Parallel Index Builds

›
Parallel Index Building Execution Plan SQL Server doesn't support parallel modifications to a b-tree index. That might sound surprising....
Friday, 31 May 2024

Impossible Execution Plan Timings

›
Erik Darling ( @erikdarlingdata ) shared an interesting SQL Server execution plan with me recently. The demo script is at the end of this ar...
Friday, 17 November 2023

Setting a Fixed Size for Transaction Log Virtual Log Files (VLFs)

›
Setting a Fixed Size for Transaction Log VLFs The documentation has this to say about virtual log file (VLF) sizes: ...
1 comment:
Monday, 13 November 2023

Why Batch Mode Sort Spills Are So Slow

›
Why Batch Mode Sort Spills Are So Slow Batch mode sorting was added to SQL Server in the 2016 release under compatib...
2 comments:
Friday, 20 October 2023

Fast Key Optimization for Row Mode Sorts

›
Fast Key Optimization for Row Mode Sorts SQL Server row-mode sorts generally use a custom implementation of the well-kn...
Wednesday, 2 August 2023

Importing a File in Batches

›
Importing a File in Batches There are a million ways to import data into SQL Server. Most of the time, we want to inges...
Tuesday, 30 August 2022

Reducing Contention on the NESTING_TRANSACTION_FULL latch

›
Reducing Contention on the NESTING_TRANSACTION_FULL latch Each additional worker thread in a parallel execution plan ex...
Saturday, 23 July 2022

More Consistent Execution Plan Timings in SQL Server 2022

›
More Consistent Execution Plan Timings in SQL Server 2022 The updated showplan schema shipped with SSMS 19 preview 2 c...
1 comment:
Thursday, 18 November 2021

Be Careful with LOBs and OPTION (RECOMPILE)

›
Be Careful with LOBs and OPTION (RECOMPILE) It sometimes makes sense to add OPTION (RECOMPILE) to a query. Typically ...
1 comment:
Saturday, 5 June 2021

Empty Parallel Zones

›
Empty Parallel Zones An empty parallel zone is an area of the plan bounded by exchanges (or the leaf level) containing...
Wednesday, 24 March 2021

Incorrect Results with Parallel Eager Spools and Batch Mode

›
Incorrect Results with Parallel Eager Spools and Batch Mode You might have noticed a warning at the top of the release ...
10 comments:
Sunday, 11 October 2020

sql_handle and the SQL Server batch text hash

›
sql_handle and the SQL Server batch text hash This article describes the structure of a sql_handle and shows how the...
5 comments:
Thursday, 8 October 2020

Closest Match with Sort Rewinds

›
Closest Match with Sort Rewinds In When Do SQL Server Sorts Rewind? I described how most sorts can only rewind when th...
Tuesday, 4 August 2020

SQL Server 2019 Aggregate Splitting

›
SQL Server 2019 Aggregate Splitting The SQL Server 2019 query optimizer has a new trick available to improve the perfor...
2 comments:
Sunday, 26 July 2020

A bug with Halloween Protection and the OUTPUT Clause

›
A bug with Halloween Protection and the OUTPUT Clause Background The OUTPUT clause can be used to return results fro...
5 comments:
Sunday, 5 July 2020

How MAXDOP Really Works

›
How MAXDOP Really Works A few days ago I ran a Twitter poll: The most popular answer gets highlighted by Twitter at ...
1 comment:
Sunday, 31 May 2020

Pulling Group By Above a Join

›
Pulling Group By Above a Join One of the transformations available to the SQL Server query optimizer is pulling a logic...
Saturday, 24 August 2019

Batch Mode Bitmap Demos

›
Batch Mode Bitmap Demos This is a companion post to my main article Batch Mode Bitmaps in SQL Server . This post provid...
Sunday, 9 June 2019

Apply versus Nested Loops Join

›
Apply versus Nested Loops Join SQL is a declarative language. We use SQL to write a logical query specification that d...
1 comment:
›
Home
View web version

About Me

My photo
Paul White
View my complete profile
Powered by Blogger.