Press "Enter" to skip to content

How Scalar UDFs Slow Down Queries

Brent Ozar takes us through one big problem around scalar user-defined queries:

When your query has a scalar user-defined function in it, SQL Server may not parallelize it and may hide the work that it’s doing in your execution plan.

To show it, I’ll run a simple query against the Users table in the Stack Overflow database.

Read on for the demo, as well as what you can do about it.