Scalar UDFs vs Inline TVFs: Measuring the Damage
Scalar user-defined functions are the most natural thing in the world to write. You have a bit of logic, you wrap it in a function, you call it in your SELECT list, and your query…
Finding Eager Index Spools in the Plan Cache
Somewhere in your plan cache right now, there is probably a query quietly building an index every single time it runs. Not once. Every execution. It builds the index, uses it, and throws it away,…
Upgrading Database Compatibility Levels Across a Whole Instance
The instance upgrade went perfectly. You moved from SQL Server 2019 to 2022, the installer turned green, the services came back up, and the application connected on the first try. A week later someone asks…