Update 6-May-2026: AI SQL Tuner Studio now supports GPT-5.4 and Anthropic models.
OpenAI released GPT-5.2 on December 11, 2025 and Microsoft added it to Microsoft Foundry the same day. I immediately integrated GPT-5.2 into AI SQL Tuner, and the updated version is now available. Benchmarking results have been outstanding, as shown below.
Contents
GPT-5.2 benefits
GPT-5.2 is a strong match for AI SQL Tuner because it combines deeper reasoning with clearer, more structured output. Microsoft describes it as:
GPT-5.2: The most advanced reasoning model that solves harder problems more effectively and with more polish. An example of this is information work, where great thinking is now complemented with better communication skills and improved formatting in spreadsheets and slideshow creation.
In practice, those improvements translate well to database tuning: stronger analysis of complex indexing tradeoffs, better plan-cache interpretation, and cleaner recommendations that are easier to review and implement.
AI SQL Server Index Tuning: GPT-5.2 Benchmark Results
I tested AI SQL Tuner using HammerDB with the TPC-H dataset. Running a benchmark with 2 virtual users and 5 query sets produced the baseline geometric mean shown below.
“Before” test run
| HDB Version | Database | Benchmark | Geomean |
|---|---|---|---|
| v5.0 | MSSQLServer | TPROC-H | 1.84 |
Recommendations
I then ran AI SQL Tuner’s index tuning workflow against the tpch database. Results returned in about two minutes. While the goal was index tuning, the tool also surfaced query rewrite opportunities by reviewing plan-cache patterns (I did not implement code changes for this test). A summary of recommendations is below. You can click here for the full results.
High-level priorities (summary)
- Fix
dbo.ordersheap by creating a clustered primary key to reduce scan/lookup overhead. - Add a nonclustered columnstore index on
dbo.lineitemto accelerate scan-heavy aggregations common in TPC-H style workloads. - Add targeted rowstore nonclustered indexes on
dbo.lineitemanddbo.ordersto support high-cost plan-cache patterns (joins, date filters, late-receipt predicates). - Optional enhancements: consider columnstore on
dbo.ordersfor analytics-heavy environments; update statistics after structural changes.
I executed all deployment-script changes except the statistics updates. I also skipped the suggested query rewrites.
Test results after implementing recommendations
After implementing the recommendations, rerunning the identical test produced a geometric mean runtime of 0.47 seconds per query.
| HDB Version | Database | Benchmark | Geomean |
|---|---|---|---|
| v5.0 | MSSQLServer | TPROC-H | 0.47 |
Using AI SQL Tuner with GPT-5.2 resulted in the geometric mean runtime being reduced from 1.84 seconds to .47 seconds, for an improvement of nearly 75%.
Fallback logic
The GPT-5.2 deployment can occasionally hit rate limits. When that occurs, AI SQL Tuner automatically retries using a secondary deployment (model-router). You’ll see a console message like this:
warn: AISQLTuner.Services.ModelAnalyzer[0] Received rate limit error from deployment gpt-5.2. Retrying with secondary deployment model-router
The fallback still produces strong output, and you can also rerun later when the service load is lower.
Conclusion
GPT-5.2 makes AI SQL Tuner even more effective: stronger reasoning for complex tuning decisions and cleaner, more actionable recommendations. If you are ready to try it you can start with the Free version (for use with SQL Server Developer Edition) or choose a paid plan for broader SQL Server support, Managed Instance and Azure SQL Database, covered by a 30-day money back guarantee.
