How to Conduct a Transact-SQL Code Review
summary
Practical checklist and runnable scripts that inspect plan cache, DMVs and Query Store (or capture with Extended Events) to flag defects: counts of cursors and temp tables, 26 occurrences of deprecated storage types, missing index recommendations, overlapping indexes, foreign keys without nonclustered indexes, stacked triggers, widespread NOLOCK misuse and missing SET NOCOUNT ON. Demonstrations show how implicit conversions (varchar vs nvarchar) turn seeks into scans (one run consumes 37% more work) and how Plan Explorer plus a GitHub repo produce repeatable, automatable reviews.
AI-written summary · about
chapters (7)
- 0:00Introduction
- 7:23Why conduct Transact-SQL reviews
- 14:05Code in flight analysis
- 25:57Cursors and temp tables
- 32:45Code at rest analysis
- 41:01Data type mismatches
- 46:20Q&A
related talks
38mCheck and Detect T SQL Code Analysis
19mStabilizing Performance with Query Store
57mYour Performance Tuning Check List
18mApparently, you can "debug" your SQL queries
49mPerformance Features in SQL Server and Azure SQL
01h 00m7 Tips to Performance Tuning, Optimization, and Everything
53mSQL Server Internals: The Practical Angle
44mImproving Performance with Intelligent Query Processing
