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.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.