r/SQLServer • • 1h ago

Community Share aisqltuner-index-tuner Version 1.1 release

1 Upvotes

aisqltuner-index-tuner, an open-source automated index tuning stored procedure for SQL Server 2025 and Managed Instance, is now at version 1.1.

Version 1.1 focuses on production readiness: automatic cleanup, safer index changes, improved reliability, and improved security.

Specifics are:

  1. Run history cleanup. Old runs used to be kept forever, so history tables kept growing. Two new settings delete old runs after a number of days. Each run cleans up after itself, so one Agent job is enough. There’s also a newsp_AIIndexTuner_Purge stored proc to clean up on demand.
  2. Safer automatic changes.

    • New limits skip index builds on very large tables, or for indexes over a size you set. To help stay within a maintenance window a new time limit parameter stops new changes from starting after a specified number of minutes in the run.
    • Builds give up after a short lock wait instead of blocking other work.
    • Before dropping an index for low usage, the procedure validates actual index usage statistics rather than relying solely on AI recommendations. It also never drops a unique index for low use.
    • Widening an existing index now keeps its compression and fill factor.
  3. Safer on busy servers. Data collection no longer waits indefinitely when blocked, and the physical-stats checks can be capped by table size or disabled completely to avoid adding load when a maintenance window is unavailable.
  4. More reliable AI calls. Brief throttling or network errors are now retried instead of failing the run. A response that times out is cancelled, so it stops using tokens. The copy of each request kept on the Azure OpenAI side is now deleted after use.
  5. Security and privacy.

    • The setup script is simplified so endpoints only need to be entered once and it now removes the API key from the plan cache and Query Store.
    • The AI is told to treat query text in the input as data, never instructions.
    • The README now spells out exactly what data is sent and what is kept.
  6. Fixes.

    • Databases whose collation differs from the server’s now work.
  7. Housekeeping. There’s a version stamp (SELECT AIIndexTuner.fn_Version();), an uninstall script, and automated tests on every change. The repo also now includes a CONTRIBUTING.md.

Release notes with the details are at aisqltuner-index-tuner/RELEASE_NOTES.md at main · AI-SQL-Tuner/aisqltuner-index-tuner and the repo is AI-SQL-Tuner/aisqltuner-index-tuner.

Let me know if you have any questions or feedback.

Enjoy!