Start here
The foundational guide that ties everything together.
Diagnose & understand
Find what is slow, and learn why.
How to Find Your Slowest Stored Procedures
Copy-paste DMV queries that rank stored procedures by average duration, CPU, and logical reads — so you tune the procedures that actually hurt.
Read the guide →Parameter Sniffing in SQL Server
What parameter sniffing is, how to recognize it, and the standard fixes — RECOMPILE, OPTIMIZE FOR, local variables, and plan-stability options.
Read the guide →How to Read a SQL Server Execution Plan
Capture a plan, read it right-to-left, and spot the operators and warning signs — scans, key lookups, and estimate-vs-actual gaps — that reveal a slow query.
Read the guide →Extended Events vs SQL Profiler
Why Extended Events replaced Profiler for tracing — lower overhead, more events, better filtering — and how to capture a real performance baseline.
Read the guide →How to Reduce Logical Reads
The most reliable measure of query work — what logical reads are, how to measure them with STATISTICS IO, and the proven ways to bring them down.
Read the guide →Statistics & Cardinality Estimation
The data the optimizer reasons from — how cardinality estimation drives plan choice, and why outdated statistics quietly cause bad plans.
Read the guide →tempdb Spills (Sort & Hash Warnings)
When a sort or hash runs out of memory and spills to disk — what the warning means, why it's slow, and the bad estimate behind it.
Read the guide →Blocking vs Locking
Why locking is normal, when blocking becomes a problem, how to find the head blocker — and why faster queries cause less blocking.
Read the guide →Deadlocks & the Deadlock Victim
How a mutual lock cycle differs from blocking, how SQL Server picks a victim (error 1205), and the disciplines that prevent deadlocks.
Read the guide →Fix the common causes
The highest-leverage rewrites, with their trade-offs.
SARGable Queries
Why functions on columns and implicit conversions force scans — and how a one-line rewrite restores an index seek.
Read the guide →Covering Indexes
Eliminate key lookups by covering a query with key and INCLUDE'd columns — and the write-cost trade-offs to respect.
Read the guide →Set-Based vs Cursors
Why row-by-row cursors (RBAR) are routinely orders of magnitude slower than set-based SQL — and how to convert them, with the cases where a cursor is still fine.
Read the guide →Index Fragmentation: Rebuild vs Reorganize
What fragmentation actually costs, when to reorganize vs rebuild, the classic thresholds — and why over-maintaining wastes resources.
Read the guide →Query Store & Plan Forcing
SQL Server's built-in plan history — how to detect a regressed query and force a known-good plan, plus Automatic Plan Correction.
Read the guide →Temp Tables vs Table Variables
Why a table variable's missing statistics cause a one-row estimate — and when a temp table is the safer, faster choice.
Read the guide →Decide with confidence
The questions teams ask before letting automation near production SQL.
AI Agents for SQL Server Optimization
What an AI agent (and "agent harness") actually is, the Claude Code pattern applied to SQL, and why a focused agent beats a general chatbot.
Read the guide →Is It Safe to Use AI to Optimize Production SQL?
The real risks of AI-generated SQL — and the validation steps (logical-equivalence checking, deterministic test harnesses, before/after tracing) that make automated optimization safe to deploy.
Read the guide →Automated vs Manual SQL Tuning
When automation wins, when manual judgment is essential, and why the strongest teams sequence the two rather than choosing one.
Read the guide →On-Premises AI for SQL Optimization
How AI can optimize SQL Server without your data ever leaving the network — the metadata-vs-data line, and what to demand of any on-prem tool.
Read the guide →See it on your own slow procedure
SprocOptimizer captures a real workload, lets Claude AI propose a fix, validates it for identical results, and measures the before/after — on-premises, with no row-level data leaving your network.
Request a Demo How It Works