26 Articles · Senior Developer Track

SQL Server Mastery

From T-SQL fundamentals to storage engine internals — a structured 5-phase learning path for developers who want to truly understand SQL Server, not just write queries that happen to work.

T-SQL Execution Plans Performance Tuning Internals
26
In-depth articles
5
Learning phases
200+
Code examples
0
Prerequisites needed
Your SQL Server Learning Path
Follow the phases in order — each builds on the last. Skip ahead if you already know the material.
Skills you'll gain across all phases
Advanced T-SQL
Query Plan Analysis
Performance Tuning
Index Design
Locking & Isolation
Storage Internals
Memory Management
Wait Statistics
Deadlock Diagnosis
Columnstore
New to SQL Server? Start here. Phase 1 builds the foundation — logical query processing, JOINs, CTEs, and grouping. Everything else in the series builds on this.
Begin Phase 1 →
1
T-SQL Fundamentals 4 articles
Logical query processing · JOINs · CTEs · GROUP BY · ROLLUP · PIVOT
T-SQL Basics

T-SQL SELECT Internals and Logical Query Processing

How SQL Server actually processes a query: logical order (FROM→WHERE→GROUP BY→SELECT→ORDER BY), NULLs, 3-valued logic.

Read guide →
Joins

JOINs Deep Dive: INNER, OUTER, CROSS and Self Joins

Every join type explained with execution plan impact, NULL behaviour, and when to use each for performance.

Read guide →
CTEs

CTEs, Recursive Queries and Derived Tables

Common Table Expressions, recursive CTEs for hierarchies, derived tables vs views vs temp tables.

Read guide →
Grouping

GROUP BY, ROLLUP, CUBE, GROUPING SETS and PIVOT

Advanced aggregation: multi-dimensional grouping with ROLLUP/CUBE, dynamic PIVOT/UNPIVOT, and MERGE.

Read guide →
2
Advanced T-SQL 6 articles
Window functions · LEAD/LAG · Frames · APPLY · JSON · Temporal tables
Window Functions

Window Functions: ROW_NUMBER, RANK, DENSE_RANK and NTILE

Ranking functions explained with pagination, deduplication, and top-N-per-group patterns.

Read guide →
Window Aggregates

Window Aggregates: Running Totals and Moving Averages

SUM/AVG OVER(), running totals, cumulative distributions, and 30-day rolling calculations.

Read guide →
Window Frames

Window Frames: ROWS vs RANGE, UNBOUNDED and CURRENT ROW

Precise frame control for YTD, rolling 12-month, and cumulative calculations.

Read guide →
Analytic Functions

LEAD, LAG, FIRST_VALUE and LAST_VALUE for Time-Series

Offset functions for comparing rows: period-over-period change, gap detection, and churn analysis.

Read guide →
Set-Based

Set-Based Thinking: Replacing Cursors with APPLY and CTEs

Eliminate row-by-row processing: CROSS APPLY, OUTER APPLY, and set-based rewrites with benchmarks.

Read guide →
Modern T-SQL

JSON, Temporal Tables, String Functions and Sequences

JSON_VALUE/JSON_QUERY, system-versioned temporal tables for audit trails, STRING_AGG, and sequences.

Read guide →
3
Execution Plans 3 articles
Graphical plans · Join operators · Plan warnings · Implicit conversions · Spills
Execution Plans

How to Read and Interpret SQL Server Execution Plans

Graphical plans, estimated vs actual rows, cost percentages, operator tooltips, and the 2-minute read method.

Read guide →
Join Operators

Join Operators: Nested Loops, Hash Match and Merge Join

When SQL Server picks each join algorithm, cost thresholds, and how to force a better choice.

Read guide →
Plan Warnings

Execution Plan Warnings: Implicit Conversions, Missing Indexes and Spills

Every warning type explained with root cause and fix — implicit conversions, memory spills, and missing stats.

Read guide →
4
Performance Tuning 7 articles
Index design · Statistics · Parameter sniffing · Wait stats · Blocking · TempDB
Indexing

Index Design: Clustered, Non-Clustered and Covering Indexes

Choosing the right index type, column order, included columns, and measuring index effectiveness.

Read guide →
Index Internals

Index Internals: B-Tree, Page Splits, Fill Factor and Fragmentation

How indexes are stored, why page splits hurt performance, and building a maintenance strategy.

Read guide →
Statistics

Statistics: How They Work, Auto-Update and Manual Maintenance

Histograms, density vectors, auto-update thresholds, and when outdated statistics cause bad plans.

Read guide →
Parameter Sniffing

Parameter Sniffing: Diagnosis and Fixes for Bad Query Plans

Reproduce parameter sniffing, identify it in the plan cache, and fix with RECOMPILE, optimize for, or plan guides.

Read guide →
Wait Statistics

Wait Statistics: Diagnosing Performance with sys.dm_os_wait_stats

Top 10 wait types decoded: CXPACKET, LCK_M, PAGEIOLATCH, SOS_SCHEDULER_YIELD and what they mean.

Read guide →
Blocking

Blocking and Deadlocks: Detection, Diagnosis and Resolution

sys.dm_exec_requests, deadlock graph XML analysis, Extended Events tracing, and prevention strategies.

Read guide →
TempDB

TempDB Internals: Version Store, Spills and Optimization

TempDB contention, PAGELATCH waits, version store growth, worktable spills, and multi-file configuration.

Read guide →
5
SQL Server Internals 6 articles
Storage engine · Transaction log · Locking · Isolation levels · Memory · Columnstore
Storage Engine

Storage Engine: Data Pages, Extents, Heaps and Clustered Tables

8KB pages anatomy, IAM pages, heap vs clustered table trade-offs, and reading raw pages with DBCC PAGE.

Read guide →
Transaction Log

Transaction Log Internals: WAL, Checkpoints and Log Reuse

Write-Ahead Logging, VLFs, checkpoint types, log reuse wait reasons, and recovery models explained.

Read guide →
Locking

Locking: Lock Types, Escalation, Isolation Levels and RCSI

S, X, U, IS, IX lock types, escalation thresholds, NOLOCK dangers, and Read Committed Snapshot Isolation.

Read guide →
Isolation Levels

Isolation Levels: READ UNCOMMITTED to SERIALIZABLE and Snapshot

Dirty reads, phantom reads, non-repeatable reads — which isolation level prevents which, with demos.

Read guide →
Memory

Memory Internals: Buffer Pool, Plan Cache and Memory Pressure

Buffer pool management, plan cache bloat with sys.dm_exec_cached_plans, and resolving OOM conditions.

Read guide →
Columnstore

Columnstore Indexes: Delta Stores, Row Groups and Batch Mode

Columnstore architecture, batch mode execution, delta store management, and analytics query acceleration.

Read guide →