An AI-assisted workflow for diagnosing and fixing slow SQL Server queries on .NET Core — from raw query to root cause to a working fix
← → navigate · L light mode · F fullscreen
If you've worked on a .NET Core app using an ORM (Object-Relational Mapping — an "auto-translator" between your code and the database), this is familiar:
Because Kiro has full access to the codebase, every optimization round becomes three things:
Every analysis is committed as its own markdown file, capturing: problem · analysis result · recommendation / next action · before & after performance.
| Script | Purpose |
|---|---|
| 01-wait-stats.sql | Wait statistics from sys.dm_os_wait_stats |
| 02-top-io-queries.sql | Top I/O queries from sys.dm_exec_query_stats |
| 03-current-indexes.sql | Existing indexes from sys.indexes |
| 04-index-usage-stats.sql | Index usage from sys.dm_db_index_usage_stats |
| 05-missing-indexes.sql | Missing index recommendations |
| 06-index-fragmentation.sql | Index fragmentation analysis |
Full setup instructions and demo flow are in the README.