SQL Server Azure SQL Azure SQL Database Azure SQL DB SQL SQL Server DBA performance tuning Indexing
Zeewolde, Flevoland, Netherlands
User-defined functions in SQL Server are very much like custom methods and properties in .Net languages. At first sight, they seem to be the perfect tool to introduce code encapsulation and reuse in T-SQL. So why is this feature mostly avoided by all T-SQL gurus?
The reason is performance. In this session, you will learn how user-defined functions feed the optimizer with misleading and insufficient information, how the optimizer fails to use even what little information it has, and how this can lead to shocking query performance.
However, you will also see that there is a way to avoid the problems. With just a little extra effort, you can reap the benefits of code encapsulation and reuse, and still get good performance.
Hugo Kornelis is an established SQL Server communiity expert who spends a lot of time at various conferences. He is also a blogger, technical editor of a variety of books, and Pluralsight author. He was awarded SQL Server MVP and Data Platform MVP 12 times (2006 - 2016 / 2019 - now).
When not working for the community, he is busy at his day job: freelance database developer/consultant.
Hugo has over 20 years of SQL Server experience in various roles. He has a strong database design background, but also loves to write and tune complex queries.