22-25 April 2026
SQLBits 2020

Fast Focus: Scalar User-defined Functions in SQL Server 2019

SQL Server 2019 introduces FROID, a framework to inline user-defined functions, promising much better performance. What problem does it solve? And how does it work?

Scalar user-defined functions (UDFs) can be great for development, since they allow easy code reuse and encapsulation. But they tend to have disastrous effects on performance in SQL Server. This forced developers into an impossible choice: use UDFs and accept worse performance (and the wrath of your DBA), or copy and paste your code all over the place and risk future maintenance.

But that will change in SQL Server 2019! Carefully hidden as "just one of the features" under the Intelligent Query Processing umbrella is "FROID" - a framework that enables SQL Server to use UDFs without suffering the drawbacks!

In this session, we will look at why UDFs traditionally are such a performance bottleneck. We will then look at what exactly changes with FROID, and how all of this works under the covers.

Is this really the panacea that MS marketing wants you to believe? Can we now finally have our cake and eat it too? Or are there limitations and problems we should be aware of?

Come to this session to find the answer to all those questions!

Speakers

Hugo Kornelis

sqlserverfast.com/blog

Hugo Kornelis's previous sessions

Here’s the execution plan … now what?
This session is for those who have learned about execution plans, but notice that the theory lessons have not prepared them for the messy reality of real production code and execution plans. Using more complex examples than typical for conference sessions, I will guide you through a few examples, to show how execution plans can be used to pinpoint isues and fix them
 
Parameter Sensitive Plan Optimization in SQL 2022 ... As Cool as it Sounds?
We'll provide a balance perspective of the benefits and limitations of the new Parameter Sensitive Plan Optimization feature in SQL 2022 to help you decide if it's right for your environment.
 
Here’s the execution plan … now what?
You know where to find an execution plan. You have taken your first steps reading them. But how are you going to apply this knowlledge to real world problems?
 
Fast Focus: Scalar User-defined Functions in SQL Server 2019
SQL Server 2019 introduces FROID, a framework to inline user-defined functions, promising much better performance. What problem does it solve? And how does it work?
 
Execution plans ... where do I start?
Execution plans are key to understanding bad query performance. But they can be overwhelming to the new user. Where to start? This session will show the basics!
 
From adaptive to intelligent: query procesing in SQL 2019
SQL Server 2019 includes new query processing features such as batch mode on rowstore, memory grant feedback, approximate query processing, and more. How do these work? Are they as good as Microsoft wants us to believe?
 
Normalization Beyond Third Normal Form
Many people think that normalization stops at Third Normal Form. But there are lots of higher normal forms. And they are not as complex or as irrelevant as often claimed. If you want to design better databases, then come attend this session!
 
Everything you always wanted to know about MERGE
In this demo-rich session, Hugo Kornelis shows how the full syntax of MERGE enables more than just synchronizing data. You'll get an overview of all the available options, plus a few surprising pitfalls you may not be aware of.
 
SQL Server 2012: Column store indexes
This session will present you with a fascinating behind-the-scenes deep-dive view of the new column store index feature. How do column store indexes work? How are they built? And how can they yield such enormous performance boosts to some workloads?