From Query Plans to Prompts: How AI Understands SQL Server Internals
Proposed session for SQLBits 2026TL; 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
This session focuses on how modern GenAI systems can be taught to understand SQL Server internals in the same way an experienced DBA or performance engineer would, rather than treating SQL as plain text.
What the session includes:
• How SQL Server query plans (estimated vs actual), wait statistics, and execution metadata can be translated into AI-friendly context.
• Designing prompts that allow AI to reason about:
Join strategies, cardinality estimation issues, missing indexes
Parameter sniffing, plan regression, and common performance anti-patterns
• Live or recorded demos where AI explains why a query is slow, not just what it does.
Technologies involved:
SQL Server (query plans, DMVs, Query Store), Amazon Bedrock (Anthropic Claude models), Optional comparison with non-AWS LLMs for contrastLightweight Python tooling for plan extraction and prompt orchestrationKey takeaway for attendees:
AI is not replacing DBAs — it is learning from their mental models. This session shows how to embed that expertise into AI systems in a practical, explainable way.
What the session includes:
• How SQL Server query plans (estimated vs actual), wait statistics, and execution metadata can be translated into AI-friendly context.
• Designing prompts that allow AI to reason about:
Join strategies, cardinality estimation issues, missing indexes
Parameter sniffing, plan regression, and common performance anti-patterns
• Live or recorded demos where AI explains why a query is slow, not just what it does.
Technologies involved:
SQL Server (query plans, DMVs, Query Store), Amazon Bedrock (Anthropic Claude models), Optional comparison with non-AWS LLMs for contrastLightweight Python tooling for plan extraction and prompt orchestrationKey takeaway for attendees:
AI is not replacing DBAs — it is learning from their mental models. This session shows how to embed that expertise into AI systems in a practical, explainable way.
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
2. Learn where AI reasoning aligns with — and diverges from — SQL Server internals
Speakers
Harmeet Singh's other proposed sessions for 2026
AI Agents for Smarter SQL Server 2025 Operations - 2026
It’s Not Just Another Database: The Reality of Modernising SQL Server to PostgreSQL - 2026
Accelerate SQL Server Modernization to Amazon Aurora PostgreSQL with Agentic AI - 2026
Accelerate SQL Server Modernization to Amazon Aurora PostgreSQL with Agentic AI - 2026