Lock Escalation, and Why You Shouldn’t Disable It!
Lock escalation affects every SQL Server database. Understanding when and why SQL Server escalates row-level locks to table locks and what you can do about it is essential knowledge for any DBA managing concurrent workloads.
Should I use (max) size for all my nvarchar/varchar columns?
Should you use VARCHAR(MAX) for all your string columns? No. Here’s why MAX costs you indexing, memory grants, and storage efficiency with demos you can run yourself.
Part 2: When the AI Code Reviewer Finds Bugs the Optimizer Didn’t
In Part 1, I walked through an interactive session with GitHub Copilot CLI where we optimized a production T-SQL function — cutting memory grants by 80% and logical reads by 73%. I thought we were…
Can GitHub Copilot Optimize Your T-SQL? I Put It to the Test
I’ve been curious about how well AI coding assistants handle real-world T-SQL optimization — not textbook examples, but production code with system DMVs, Availability Groups, and windowed functions. So I pointed GitHub Copilot CLI at…
Performance of CAST vs CONVERT
This post is a follow-up to my prior post inspecting the performance of PARSE vs CAST & CONVERT, where we see that PARSE is an order of magnitude slower than CONVERT. In this post, we’ll…
PARSE vs CAST and CONVERT
T-SQL often provides multiple ways to “skin a cat”1 as they say. In this post, we’ll take a look at two “interesting” ways to convert dates and times from character-based columns into a column using…