Presented by: Brent Ozar
Dynamic SQL is one of the most powerful tools in the database developer's arsenal. When you need a complex search stored procedure that takes all kinds of parameters (price, category, location, color), dynamic SQL can run extremely quickly by leveraging better indexes. However, when done wrong, it's extremely painful to troubleshoot.
I'm Brent Ozar, a Microsoft Certified Master who's been working with dynamic SQL for over a decade. I'll show you how to use sp_executesql, sp_BlitzCache, and my favorite tricks for easier debugging and commenting.
This session was part of GroupBy Americas in the Development track.
Stay updated on GroupBy’s next online conference on October 27-28, 2020: https://groupby.org