22-25 April 2026

From Query Plans to Prompts: How AI Understands SQL Server Internals

Proposed session for SQLBits 2026

TL; DR

How does AI “read” SQL Server execution plans? This session dives into how AI interprets query plans, costs, and operators, where it helps, where it fails, and how DBAs can use it safely for performance tuning.

Session Details

SQL Server professionals have spent years learning how to read execution plans, interpret operators, estimate costs, and reason about the query optimiser’s decisions. Today, AI systems are beginning to do something similar — but in very different ways.

This session goes deep into how AI models interpret SQL Server internals, focusing on execution plans, statistics, indexes, and query patterns. We will explore how Large Language Models reason about operators, cardinality estimates, join strategies, and plan regressions, and where that reasoning aligns — or dangerously diverges — from how SQL Server actually works.

Rather than marketing hype, this talk is grounded in real-world examples. You’ll see how AI turns execution plans into explanations, recommendations, and tuning suggestions, why it sometimes gets things wrong, and how experienced DBAs and developers should validate and control AI output.

Attendees will leave with a clear mental model of what AI understands, what it guesses, and what it does not know about SQL Server internals — empowering them to use AI safely and effectively for performance tuning, troubleshooting, and education.

3 things you'll get out of this session

1. Understand how AI interprets SQL Server execution plans and optimiser decisions 2. Learn where AI reasoning aligns with — and diverges from — SQL Server internals