People have been writing about how evil scalar functions are in SQL Server for ten years. But people still use scalar functions in their code all the time. And not dumb people, either: smart people do this, too. I bet you they’re in your codebase.
Good people write bad database code for many reasons:
- Bad code patterns often look simple and elegant
- Smart people re-use code patterns, so when a bad pattern gets into your code, it tends to spread
- Most people, even smart people, aren’t great at remembering loads of gotchas, especially if they need to work in multiple languages or in multiple areas of specialization
This is why I’m so excited about Microsoft’s new Intelligent Query Processing features for SQL Server: they are upping their game and working to make your existing code run better.
But, with all new things, you may need to be careful.
If you’re curious to know how this can help your code — and where it may not work well — sign up to join us for Redgate Streamed on Friday, April 3. At 4 PM GMT / 10 AM CDT, Kathi Kellenberger will give you an introduction to Intelligent Query Processing and show you examples of where it helps bad code, and where it doesn’t.
This is a free, virtual event. If you aren’t able to make it live, go ahead and register and you’ll automatically get access to the recordings for free.
If you are able to make it live, we look forward to your comments and questions! Hope to see you there.