Query Tuning Internals for the Advanced SQL Developer - Part 1
50+50 minute session for SQLBits 2026Saturday - 25 Apr 2026 - 09:00 - 09:50 Room 2BTL; DR
Learn the hidden internals of query processing and apply those lessons in your SQL applications, diving deep into the algebrizer, simplifier, and query optimizer.
Session Details
Skilled SQL developers know that the SQL Server query optimizer uses a multi-step process to produce execution plans. But what about deeper components like the parser, the binder, the simplifier, the algebrizer, and the undocumented internals of optimizer itself?
This session teaches you advanced techniques of examining query optimizer internals, as well as surprising behaviors of the query optimization process that can have a dramatic impact on performance. We pay special attention to the processes that build the internal query memo structure and query transformation heuristics, such as associative, commutative, and transitive transformations.
We will examine a variety of everyday queries whose performance can be greatly improved by apply a deeper understanding of these internal behaviors. Lots of examples and demos!
This session teaches you advanced techniques of examining query optimizer internals, as well as surprising behaviors of the query optimization process that can have a dramatic impact on performance. We pay special attention to the processes that build the internal query memo structure and query transformation heuristics, such as associative, commutative, and transitive transformations.
We will examine a variety of everyday queries whose performance can be greatly improved by apply a deeper understanding of these internal behaviors. Lots of examples and demos!
3 things you'll get out of this session
Learn advanced and undocumented methods to see the steps of parsing, binding, algebrizing, simplifing, and query optimization.
Explore the SQL Server internal memo structure to see how SQL Server uses the heuristics of the algebrizer and query optimizer.
Walk through a variety of SQL queries whose behavior can be greatly improved when you apply what you’ve learned about the algebrizer and query optimizer.
Explore the SQL Server internal memo structure to see how SQL Server uses the heuristics of the algebrizer and query optimizer.
Walk through a variety of SQL queries whose behavior can be greatly improved when you apply what you’ve learned about the algebrizer and query optimizer.
Speakers
Kevin Kline's other proposed sessions for 2026
Query Tuning Telemetry for the Advanced SQL Developer - Part 2 - 2026
Stop Firefighting! How to Beat the DBA Burnout Crisis - 2026
Kevin Kline's previous sessions
How to Conduct a Transact-SQL Code Review
Learn a collection of important best practice for Transact-SQL code and how to integrate them into your code acceptance testing for better performance and efficiency.
Shift-Left: A DevOps and Database Story
Database code often works well in a test environment, but end up causing significant performance issues when rolled out to production. In turn, these performance issues lead to lost productivity, excess resource consumption, and lost time spent troubleshooting the issue. But what if we could catch those issues during development? Join Kevin Kline to learn how SolarWind's SQL Sentry can shift performance tuning left to the dev cycle so those issues never occur on production systems in the first place.
SQL Horror Stories
Join Kevin Kline as he takes you on a guided tour of some of the worst and most horrible SQL coding experiences. Some were intention and some were accidental. But all of them will make you wince and laugh! Learn new SQL coding tips and tricks from these cautionary tales.