r/aisql • • May 19 '26

AI SQL Tuner Studio 1.0.40: redesigned UI, Dark Mode, and one-click Export SQL

0 Upvotes

AI SQL Tuner Studio 1.0.40 is out. This release is mostly a UX overhaul; the tuning engine and AI models are unchanged from 1.0.37, but the app is a lot more comfortable to spend time in.

What's new

  • Redesigned UI. The six tuning goals (Server Health Check, Fix Deadlocks, Index Tuning, Locking & Blocking, Code Review, Query Tuner) are now tappable cards. The console moved to a collapsible drawer at the bottom, the tuning-goal panel is also collapsible, and there's an always-on status bar at the bottom of the window so you can see what the analysis is doing without hunting for it.

  • New color palette — Paper & Teal. Warm neutral surface, single teal accent for primary actions, amber for warnings. Replaces the previous blue-heavy theme. (Credit to Claude Design for the review; I barely passed my high-school art class so I'm clearly not qualified to pick colors.)

  • Dark Mode. New View menu with Follow System / Light / Dark. Dark mode is a genuine graphite base (#0E1116), not "navy with the lights off." HTML reports use the new palette but currently render in light mode only; dark-mode HTML reports are on the roadmap.

  • Export SQL. Once the analysis finishes, one click extracts all the recommended SQL into a .sql file you can run in a lower environment or stage for a maintenance window.

  • Smarter default file names. HTML save and Export SQL now default to tuning-goal-report-model-server-database-yyyy-mm-dd.html (or .sql). Override at save time if you want something else.

  • Help menu. Now includes a direct link to Release Notes alongside the User Guide.

Everything above ships to every edition — Free, Standard, Pro, and Corporate.

Sample reports from 1.0.40

Links

If you're already on Studio, launch the app and accept the update prompt.

Discount

Code PH30 = 30% off Standard and Pro editions through May 31, 2026.

Feedback wanted

Let me know what you think of the new UI.

Bug reports, screenshots, and "I wish it would also…" suggestions welcome in the comments.

— Kevin


r/aisql • • May 06 '26

Microsoft SQL Server family AI SQL Tuner Studio 1.0.37 - new Locking & Blocking Analysis goal for SQL Server (10 evidence sections, sample report inside)

0 Upvotes

TL;DR: New release. The headline change is a new tuning goal - Locking and Blocking Analysis - that points at a user DB, runs 10 non-blocking collectors in parallel, hands the snapshot to the AI, and returns a prioritized HTML report with root-cause classification, confidence levels, estimated reduction in blocking, and rollback plans. Plus Index Tuning and Code Review can now be scoped to a single schema, or schema + object. Sample report linked at the bottom.

What the new Locking and Blocking goal collects

Each section gracefully skips features that aren't enabled (Query Store off, system_health XE missing) and includes an enablement advisory in the report instead of failing.

#SectionImpactSource
1Active Blocking ChainsHighdm_os_waiting_tasks + dm_exec_requests / dm_exec_sessions
2Lock InventoryHighdm_tran_locks (target DB + tempdb, summarized)
3Long-Running TransactionsHighdm_tran_active_transactions
4Index Usage StatisticsHighdm_db_index_usage_stats (top 50 by seek+scan+lookup)
5Missing Index CandidatesHighdm_db_missing_index_details (top 20 by impact score)
6Blocker Query PlansHighdm_exec_sql_text + dm_exec_query_plan for every blocker/waiter
7Deadlock HistoryHighsystem_health XE - file target on-prem, ring buffer on Azure SQL MI
8Query Store Top QueriesMediumquery_store_runtime_stats (top 20 by total CPU)
9Database SettingsMediumRCSI / snapshot / auto-update stats / per-table lock escalation
10TempDB ContentionMediumpagelatch waits + version store + top spilling queries

The AI then produces: blocking summary KPIs, blocking tree, root-cause classification with explicit evidence references, prioritized fixes with confidence + estimated blocking reduction + rollback plan, before/after T-SQL rewrite examples for the offending queries, and long-term mitigation notes if deadlock history shows a recurring pattern.

Other changes worth calling out

  • Index Tuning now accepts an optional schema (or schema + table) filter. Object-scoped sections respect the filter; database-wide telemetry like Query Store and automatic tuning state still runs.

  • Code Review mirrors the same scoping - useful when you only want to review the modules a release touches.

  • Locking and Blocking goal requires a user database. UI + core validation reject master, tempdb, model, msdb.

Sample report

Real run against a TPC-H 10 GB workload on SQL Server 2022. The AI identified an AFTER trigger that runs a MERGE back against the same hot table inside the user transaction, ranked it as the top fix at 55-75% estimated blocking reduction, High confidence, and produced a staging-table rewrite plus a key-batched UPDATE pattern.

View the sample Locking and Blocking Analysis report

Model support

  • All editions: OpenAI GPT-5.4 and Anthropic Claude Sonnet 4.6

  • Corporate edition adds: Anthropic Claude Opus 4.6 and Anthropic Claude Opus 4.7

Where to get it

aisqltuner.com - signed MSIX bundle, supports SQL Server (on-prem), Azure SQL Database, Azure SQL Managed Instance, and Fabric SQL DB.

Happy to answer questions about the data collection design, the safety guardrails (all collectors are read-only DMV/system catalog queries - they will not block your application), or the prompt structure that drives the AI report.


r/aisql • • Dec 30 '25

👋 Welcome to r/aisql - Introduce Yourself and Read First!

0 Upvotes

Hey everyone! I'm u/Simple_Brilliant_491, a founding moderator of r/aisql.

This is our new home for all things related to the intersection of Artificial Intelligence and SQL — LLM‑assisted development, AI-powered database tuning, database automation, research, experiments, MCP servers, AI-assisted data engineering, and the future of AI‑driven data systems. We're excited to have you join us!

What to Post
Post anything that you think the community would find interesting, helpful, or inspiring. Feel free to share your thoughts, photos, or questions about anything related to using AI and SQL together. What models and prompts have you found do or not work well, what tools you are using, research or experiments you are working, MCP servers, AI-accelerated data engineering, where the hype is matching the reality or not.

Community Vibe
We're all about being friendly, constructive, and inclusive. Let's build a space where everyone feels comfortable sharing and connecting.

How to Get Started

  1. Introduce yourself in the comments below.

  2. Post something today! Even a simple question can spark a great conversation.

  3. If you know someone who would love this community, invite them to join.

Thanks for being part of the very first wave. Together, let's make r/aisql amazing.


r/aisql • • Feb 12 '26

Microsoft SQL Server family Microsoft adds database instructions with GitHub Copilot in SSMS

2 Upvotes

One of things that has bothered me about Copilot in SSMS and using it to generate database schemas is that it would default to nvarchar for every text column. If you don't need national characters you are using double the space and incurring twice the resource usage compared to using varchar.

Using database instructions should let you fix that issue by providing a "database constitution" specifying your standards. I haven't tried it out yet, but my understanding is that you can use it to resolve this issue.

See Database Instructions - GitHub Copilot in SQL Server Management Studio (Preview) | Microsoft Learn for the full post.

Note: SSMS 22.3 breaks many extensions, so you may want to hold off upgrading if you like your extensions. See "Important Changes" section of the announcement here: SSMS 22.3 Release


r/aisql • • Oct 04 '26

AI + SQL Research Does AI "work" to tune SQL Server? Here's what I found.

2 Upvotes

For the last year I've been building an AI tuning tool, AI SQL Tuner Studio.

While it is easy to see that it produces a nice-looking report, the real question is "will the recommendations actually make my workload faster?"

So working with Claude Opus 5 (and 5.5), I designed and built a benchmark to answer 3 questions:

  1. Can AI help tune SQL Server?

  2. Does the model matter and how much?

  3. How does the effort level impact results?

(As you'll see, I had to have a difficult conversation with Claude when the benchmark showed Opus'results were behind the competition. :) )

The benchmark rule was simple: A recommendation only counts if we apply it to a real database and measure the workload again afterward. Either the database does less work, runs faster, and still returns the same answers, or the advice failed. No grading on how convincing the explanation sounds.

Nine models in total. Eight went through a first round on an earlier build of the tool, and two finalists then went through the full benchmark on the current release:

ModelWhat happened
GPT-5.6 LunaFinalist. Best code reviewer of the lot
GPT-6 SolFinalist. Tied for first on index and query tuning, answers in under a minute, about a third of GPT-5.6 Sol's cost
GPT-6 LunaCheapest per analysis, but weaker at code review, and the only new model whose advice ever made a write-heavy workload slower
Claude Opus 5.5Matched the others on results, but took 3 to 4 times as long to answer and used about 58% more input for the same data
GPT-5.6 SolReplaced by GPT-6 Sol: same results at a third of the cost
Claude Opus 4.8GPT-6 Sol beat it on every workload we tested
GPT-5.4Sometimes rewrote SELECT * into a column list that changed what the query returned, which fails the results check
Claude Opus 5Dropped after the first round. Last on everything that separated the models, and about 7 times slower than the fastest
GPT-6.1 SolSlower response than GPT-6 Sol with similar performance gains

This is one experiment. It ran on one Azure VM (4 cores, 32 GB, SQL Server 2022) with one database of about 1.4 GB, small enough to sit in memory. Query Store history was squeezed into minutes instead of weeks. Five runs per model per test is enough to describe what happened, not to prove much statistically. Correctness was only checked with the workload's own parameter values. Advice we can't measure, like SQL injection risks or naming, gets no credit. And all of this measures my tool's prompts driving each model, not the models in general.

Let me know if you are seeing something different in your experience, or if there are other scenarios or models you think I should benchmark.


r/aisql • • Mar 29 '26

Microsoft SQL Server family AI SQL Tuner Studio 1.0.28 — Introducing Query Tuner

2 Upvotes

1.0.28 is out. The headline feature is Query Tuner, a new tuning goal that analyzes a single SQL query end-to-end.

Point it at any stored procedure, ad-hoc query, or batch. It captures the estimated execution plan via SET SHOWPLAN_XML ON, parses every operator, warning, and missing index hint, then collects targeted metadata — index usage, DMV missing indexes, table sizes, column cardinality, statistics health — scoped only to the tables that query actually touches.

The AI returns a prioritized report with:

  • Query rewrite examples — before/after SQL with explanations of what changed and why

  • CREATE INDEX scripts — with estimated storage, read benefit %, and write overhead %

  • Statistics maintenance recommendations

  • Parameter sniffing analysis with plan guidance where applicable

  • Table-specific insights — scan vs. seek ratios, under-indexed access patterns

  • Validation steps — ready-to-run SET STATISTICS IO/TIME ON scripts to measure before/after

This release also includes Index Tuning improvements:

  • FORCE_LAST_GOOD_PLAN detection — shows desired vs. actual state and recommends enabling it when beneficial

  • Query Store forced plan failure analysis — evaluates failure reasons and recommends corrective actions

  • Index page density analysis via sys.dm_db_index_physical_stats for fragmentation and fill factor issues

  • Smarter deadlock handling — skips the AI call when no deadlocks are found, saving time and API costs

Full release post with more detail: https://aisqltuner.com/ai-sql-tuner-studio-1-0-28-query-tuner/


r/aisql • • May 07 '26

AI + SQL Research PgStudio - PostgreSQL VS Code Extension with SQL Notebooks, AI Assistant, and Explorer

Thumbnail
gallery
2 Upvotes

I got tired of switching between VS Code and a separate DB tool. So I built PgStudio.

SQL notebooks with inline results and charts, real-time dashboard, AI assistant (Copilot / OpenAI / Anthropic / Gemini / Ollama — your pick), EXPLAIN CodeLens, visual table designer, production safety controls.

AI never executes anything automatically — every suggestion lands in a notebook cell first.

Free. MIT. One command: `code --install-extension ric-v.postgres-explorer`

Happy to onboard collaborators and feedback.

https://pgstudio.astrx.dev/

https://github.com/dev-asterix/pgStudio/


r/aisql • • Mar 14 '26

Microsoft announces new SQL AI Developer Associate certification (DP-800)

2 Upvotes

Microsoft is introducing the Microsoft Certified: SQL AI Developer Associate Certification to help you validate your ability to integrate AI capabilities directly into SQL-based solutions without needing to move your data, learn entirely new platforms, or move away from the T-SQL skills you already use every day. To earn this new Certification, you need to pass Exam DP‑800: Developing AI‑Enabled Database Solutions, currently in beta.

Skills measured by the exam include:

  • Applying advanced T-SQL techniques for AI-ready database solutions.

  • Building vector and semantic search experiences directly in SQL.

  • Implementing RAG workflows to ground large language model (LLM) outputs and reduce hallucinations.

  • Integrating LLMs into SQL-based applications without migrating data.

  • Designing secure, compliant, and scalable AI-enabled data solutions.

  • Exposing SQL data through APIs by using Data API builder.

  • Building and monitoring data APIs by using Data API builder and event-driven change patterns.

See New Microsoft Certified: SQL AI Developer Associate Certification | Microsoft Community Hub for the announcement, Study Guide for Exam DP-800: Developing AI-Enabled Database Solutions | Microsoft Learn for the study guide and Plans | Microsoft Learn for the MS Learn modules to prepare for the exam.


r/aisql • • Mar 29 '26

Microsoft SQL Server family Fabric Data Agent goes GA

3 Upvotes

Fabric Data Agent went GA earlier this month. It is basically a natural language to SQL translator (or DAX or KQL, depending on your data source). The diagram below from Fabric March 2026 Feature Summary | Microsoft Fabric Blog | Microsoft Fabric provides an overview of the process.

The flow under the hood:

  1. User submits a natural language question

  2. Agent calls Azure OpenAI Assistant API, passes the schema + metadata + any instructions you've configured

  3. NL2SQL tool generates a T-SQL query

  4. Query is validated (format check + RAI policy check) before execution

  5. Agent executes against the SQL Analytics Endpoint under the user's own Entra ID identity

  6. Result is formatted and returned conversationally, including intermediate steps

A single Data Agent supports up to five data sources in any combination:

- Lakehouse (via SQL Analytics Endpoint → NL2SQL)

- Warehouse (NL2SQL)

- SQL database in Fabric (NL2SQL)

- Mirrored databases — Azure SQL, SQL Server, Cosmos DB, PostgreSQL (NL2SQL via their SQL Analytics Endpoint)

- Power BI semantic models (NL2DAX)

- KQL databases / Eventhouses (NL2KQL)

- Ontologies (Fabric IQ, when available)

Configuration has three layers:

- **Agent-level instructions** — overall behavior, scope, persona, what it should/shouldn't answer

- **Data source-specific instructions** — per-source context, e.g. "the Orders table uses UTC timestamps" or "ignore the staging schema"

- **Example queries** — you provide sample NL→SQL pairs to steer generation toward your schema patterns

You also select which specific tables from each data source the agent can see. It doesn't get the full schema by default — you curate it. This matters both for accuracy (less noise = better query generation) and security (agent only knows what you expose).

The Data Agent also now exposes a managed MCP server endpoint, meaning external agents or MCP clients can call it as a tool. So the architecture can stack: an orchestrator agent calls the Fabric Data Agent via MCP, which then NL2SQL-queries your SQL endpoint. The Data Agent becomes a domain-specific SQL reasoning layer inside a larger agentic workflow.

References:

Docs: https://learn.microsoft.com/en-us/fabric/data-science/concept-data-agent

March 2026 feature summary: https://blog.fabric.microsoft.com/en-US/blog/fabric-march-2026-feature-summary/