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 →
Practical DBA Guides
Query performance tuning · Backup & recovery strategy · Always On Availability Groups
Performance Tuning

SQL Server Query Performance Tuning — Execution Plans, Index Strategy & Query Rewrites

Read execution plans, fix 5 damaging query patterns (implicit conversions, functions on indexed columns, SELECT *, non-SARGable LIKE, scalar UDFs), build covering and filtered indexes, use Query Store to catch regressions, and 10 quick wins you can apply today.

Read guide →
Backup & Recovery

SQL Server Backup and Recovery Strategy — RPO, RTO, Schedules & Disaster Recovery

RPO/RTO defined per criticality tier, recovery models explained, robust backup scripts with COMPRESSION+CHECKSUM, point-in-time restore with STOPAT, Ola Hallengren setup, Azure Blob backup, and step-by-step DR scenarios for server loss and accidental table drop.

Read guide →
High Availability

SQL Server Always On Availability Groups — Setup, Monitoring & Failover

Complete T-SQL setup from scratch (endpoints, CREATE AVAILABILITY GROUP, listener), readable secondaries with routing, health dashboard DMV queries, planned and forced failover, rolling patching pattern, and Basic AG vs Enterprise AG comparison.

Read guide →
SQL Server Version Migration Guide
In-place upgrade · Backup/restore · Log shipping · Availability Groups · Data loss prevention · Case study
Migration

SQL Server Version Migration: Complete Guide

12 assessment factors, 4 migration strategies (in-place, backup/restore, log shipping, AG), zero-data-loss tail-log technique, 20-check post-restore validation suite, Query Store regression monitoring, rollback plan, 10 common post-migration problems, and a DemoBank Finance case study (SQL Server 2014 → 2019, 3-hour window, zero data loss).

Read guide →
DemoBank Finance — Real-World Case Study
Legacy Progress OpenEdge 4GL migration to SQL Server 2019 · 18-table asset finance schema · COBOL VISION compatible

A five-part case study following a real-world migration of a UK asset finance company from Progress OpenEdge 4GL to SQL Server 2019. Covers the full DDL, COBOL VISION constraints, application-managed relationships, migration strategy, and modernisation results. Targets senior DBAs, finance-sector consultants, and 4GL migration specialists.

Schema Design

Part 1: Designing a Legacy Asset Finance Database

Full 18-table DDL for an 85,000-contract HP and Lease system. COBOL VISION rules: CHAR fields, INT dates, app-managed sequences, no FK constraints.

Read case study →
COBOL VISION

Part 2: COBOL VISION Files and SQL Server

The three COBOL copybooks, fixed-length record mapping, and the T-SQL validation procedure that stops corrupt VISION file exports before they happen.

Read case study →
Referential Integrity

Part 3: No Foreign Keys — Application-Managed Relationships

The 4 RI patterns Progress 4GL used instead of FK constraints, all 10 orphan audit queries, remediation strategies, and a phased plan for safely adding FK constraints post-migration.

Read case study →
Migration

Part 4: Migrating DemoBank Finance

Five-phase plan, SSIS staging pipeline, 90-day parallel run with 7 reconciliation failures, 23-check cutover weekend, and the 3 Month-1 production incidents.

Read case study →
Modernisation

Part 5: Before vs After — The Real Benefits

Hard numbers: 4-hour report → 3.5 min (67×), £152K annual saving, 2 FCA findings closed, 2.8-year payback. Plus the three things that did not improve and the six lessons every 4GL migration needs.

Read case study →