Skip to content

Details

This session is mainly in-person, but if you need a Teams link, I can send you one on the morning of the event. The first half hour of the in-person meeting will be networking over pizza. The presentation will start after that.

T-SQL functions have a long history of causing performance problems, particularly scalar UDFs that run once per row, hide their cost from the optimiser, and block parallelism. For years, the safest advice was simply “don’t use them”, and I wasn’t shy about telling people how bad they were - you may have heard me present on that before!

More recent versions of SQL Server / Azure SQL have changed that story… somewhat. Scalar UDF inlining means that some functions can now be rewritten by the optimiser and treated like part of the calling query. When this works, the performance difference can be dramatic. When it doesn’t, you’re often back to the same problems we were hitting twenty or thirty years ago.

In this session we’ll look at why inlining is such a key to performance, and what you can do to make the cost of scalar functions almost disappear. There are a bunch of patterns that stop it working, so we’ll explore those gotchas. It’s a demo-heavy session, but with practical takeaways to make your queries just run quicker.

Related topics

Events in Adelaide, AU
Data Analytics
Power BI
Database Professionals
SQL Server

Sponsors

Microsoft

Microsoft

Microsoft let us meet at their offices.

LobsterPot Solutions

LobsterPot Solutions

LobsterPot Solutions provides the pizza when we meet in person.

You may also like