22-25 April 2026

The Lifecycles of Queries: How SQL Server Really Executes Your Code

Proposed session for SQLBits 2026

TL; DR

Follow queries from the moment a client sends a request through optimisation, execution, and storage. This full day session explains where performance problems come from, and how to monitor, diagnose, and fix them.

Session Details

SQL Server performance problems are often diagnosed by looking at one part of the system in isolation. Execution plans, waits, and metrics all provide useful signals, but rarely explain how a problem started or why it persists.

In this full day training session, we will follow multiple queries through their lifecycles, starting with the client request and security context, moving through parsing and optimisation, crossing into the storage engine, and continuing through execution and resource usage.

We will examine how SQL Server builds and transforms query trees, including parsing, binding, constant folding, logical and physical operators, statistics, and cardinality estimation. From there, we will follow execution into the storage engine, covering access methods, locking and the transaction manager, write-ahead logging, and how data is read from and written to memory and disk through the buffer pool and extended buffer pool.

The session continues beyond query execution to look at what happens over time. We will cover TempDB usage, memory pressure, checkpoints, page eviction, and how SQL Server monitors and reacts to workload behaviour using features such as Query Store, automatic tuning, missing index feedback, and trace flags. We will also look at instance-level controls such as security and Resource Governor, and how they influence workload behaviour in consolidated environments.

Throughout the day, theory will be demonstrated wherever possible, with practical examples used to connect internal behaviour to real world performance, monitoring, and diagnostic scenarios. The goal is to give attendees a clear mental model of how SQL Server executes work end to end, so performance problems can be understood and solved rather than guessed at.

3 things you'll get out of this session

Follow queries through SQL Server from client submission to physical execution and storage. Diagnose performance issues by linking execution plans to real runtime and instance-level behaviour. Make informed intervention decisions in consolidated SQL Server environments using built-in monitoring and control features.

Speakers

Richard Douglas

Richard Douglas's previous sessions

Improving SQL Server Performance with Indexing
Indexing presents daunting challenges for even the most seasoned professionals, it offers countless options to choose from. With a little help you’ll see how to simplify indexing in your environment & improve the overall performance of your apps
 
Investigate TempDB like Sherlock Holmes
Learn how to investigate the mysterious case of SQL Server performance problems in TempDB.
 
Alerting; Beyond the Basics
We'll look at events that you should be monitoring, how you can use various services & IoT enabled devices to alert you in ways that were never possible. You'll leave with a new outlook of how teams can be notified to fix problems faster than ever.
 
The Big Backup Theory
In this session, you'll gain invaluable guidance for optimizing your backup strategies. Using trace flags the session will cover how SQL Server manages its own backup options and how you can tune them to meet your SLAs.
 
Wait watchers-Gain Performance Increases Fast!
In this session you'll learn all about SQL Server wait statistics. These are statistics the database engine stores about the resources it is waiting on. Armed with this information you as a SQL Server professional can make better informed decisions.
 
The Day After Tomorrow; Why You Need to Baseline
Ensuring top performance is never easy. To maintain performance you need to make sure you’re monitoring the right things. How do you know if the figures you’re seeing are good or bad? Baseline comparisons can help.