Scary Scalar Functions

4 posts
Scary Scalar Functions - Part Four: Your Environment

Scary Scalar Functions - Part Four: Your Environment

You've learned why Scalar UDFs are slow and how to remove them. The last question: where do you even start? Here's how I triage them across a whole environment.

Deep Dive 5 min read Performance · Parallelism
Scary Scalar Functions - Part Three: The Cure

Scary Scalar Functions - Part Three: The Cure

Nuke them from orbit, or inline them. The practical ways to neutralize Scalar UDF performance pain, from a free SCHEMABINDING win to a full ITVF rewrite.

Deep Dive 11 min read Performance · Parallelism
Scary Scalar Functions - Part Two: Performance

Scary Scalar Functions - Part Two: Performance

A Scalar function that does literally nothing still runs over 20 times slower. Here is the proof, measured four different ways.

Deep Dive 8 min read Performance · Query Store
Scary Scalar Functions - Part One: Parallelism

Scary Scalar Functions - Part One: Parallelism

Consultants hate me for this one weird trick. Because I'll be uncovering all the mess Scalar functions can cause in a series of articles.

Deep Dive 6 min read Performance · SQL Server 2022