AI SQL Tuner Studio 1.0.28 — Introducing Query Tuner

AI SQL Tuner Studio 1.0.28 is now available, and it introduces a significant new capability: Query Tuner. This release also rolls up Index Tuning improvements that shipped in 1.0.27 but were never formally announced.

Query Tuner: AI-Powered Execution Plan Analysis

Query Tuner is a new tuning goal that analyzes a single SQL query in depth. Point it at any stored procedure, ad-hoc query, or batch, and it captures the estimated execution plan via SET SHOWPLAN_XML ON, then parses the plan XML to identify referenced tables, operators, warnings, and missing index hints.

From there it collects targeted metadata — index usage stats, DMV missing indexes, table sizes, foreign keys, column cardinality, and statistics settings — scoped only to the tables your query actually touches. Everything is sent to the AI model, which returns prioritized, evidence-based recommendations specific to that query.

What You Get in the Report

The Query Tuner report is structured around actionable sections. Each recommendation cites specific plan nodes, operator costs, and DMV evidence so you can verify every suggestion against your own environment:

  • Executive summary — a prioritized overview of findings, ranked by expected performance impact, with a confidence score
  • Detailed recommendations — each recommendation explains the problem, shows the plan evidence, and estimates the expected impact
  • Query rewrite examples — side-by-side before/after SQL rewrites with explanations of what changed and why
  • Index recommendations — complete CREATE INDEX scripts with estimated storage, read benefit percentage, and write overhead percentage
  • Statistics maintenance — assessment of whether stale or sampled statistics are contributing to plan quality issues
  • Parameter sniffing analysis — evaluation of whether parameter sensitivity is a factor, with plan guidance recommendations where applicable
  • Table-specific insights — per-table analysis of storage, scan vs. seek ratios, and under-indexed access patterns
  • Validation steps — ready-to-run scripts using SET STATISTICS IO/TIME ON so you can measure before and after

For full details on what Query Tuner collects, supported query types, platform requirements, and permissions, see the Query Tuner feature page.

Index Tuning Improvements (from 1.0.27)

Version 1.0.27 shipped several enhancements to Index Tuning that are now included in 1.0.28. These expand the data the AI has to work with, resulting in more targeted index and configuration recommendations.

Automatic Tuning Options Check

Index Tuning now detects whether FORCE_LAST_GOOD_PLAN — SQL Server's automatic plan correction feature — is enabled on SQL Server 2017 and later. The report shows the desired vs. actual state along with the reason for any mismatch, and the AI recommends enabling it when it would benefit your workload.

Query Store Forced Plan Failure Analysis

When Query Store is active, Index Tuning now collects forced plans that have accumulated failure counts. The AI evaluates the failure reasons and recommends corrective actions — whether that means dropping a stale forced plan, updating indexes to stabilize the preferred plan, or investigating schema changes that invalidated the original plan.

Index Page Density Analysis

Index Tuning now collects avg_page_space_used_in_percent from sys.dm_db_index_physical_stats in SAMPLED mode. When an index has low page density — indicating internal fragmentation or a poorly chosen fill factor — the AI flags it for rebuild or fill factor adjustment.

Other Improvements

  • Smarter deadlock handling — when the Fix Deadlocks goal finds no deadlocks in the system, it now generates a local "no deadlocks found" report instead of making an unnecessary AI call, saving time and API costs
  • Updated user guide — documentation has been updated with Query Tuner instructions, AI prompt behavior details, permissions reference, platform support matrix, and troubleshooting guidance

Get Started

Download AI SQL Tuner Studio 1.0.28 to try Query Tuner on your own queries. Select the Query Tuner tuning goal, enter your SQL statement, and let the AI analyze the execution plan. The full report is generated as a standalone HTML file you can share with your team or archive for future reference.

Comments

Popular posts from this blog

Identifying Possible Price Fixing in the market of Ethacrynic Acid 25 MG tablets

Jumping into Azure Data Lake

Getting Started with SQL Server 2017 - Installation