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.
Teaching GitHub Copilot Your T-SQL Coding Standards
If you’re a DBA or database developer using GitHub Copilot CLI, you’ve probably noticed it generates functional T-SQL — but not necessarily T-SQL that matches your team’s coding standards. After several weeks of working with…
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…
Auditing DDL Events
SQL Server doesn’t audit DDL events out of the box, aside from several major events which are captured in the Default System Trace. By “audit”, I mean there is no log of the data-definition-language statements…
Auto Parameterization and Implicit Conversion
When SQL Server processes a query that can be auto parameterized, the results can be a bit, shall we say, unexpected. Auto parameterization makes an implicit conversion to numeric(10,0) when there is a divisor present…