Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By erikdarlingdatav1.0.0MITIn 1 marketplace
Tunes a slow SQL Server query or procedure by comparing rewritten variants on CPU, elapsed time and result matches. All tests run on a copy of the database, and the skill stops if it cannot tell which server that is.
Trending plugins
7-day copy clicks
Claude loads one when your task matches it, or you run it by name.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
A skill that makes Claude tune one slow SQL Server query or stored procedure in a fixed order. Every test runs on a copy of the database. The skill comes from Erik Darling's AI for Database Teams course.
/plugin install sqlserver-tune-a-query@erikdarling
The skill is model-invoked. Name a slow query, a query_id, a procedure, or a slow screen, and ask why it is slow or how to make it faster.
EXCEPT in both directions and a count of each distinct row. It compares CPU time and elapsed time.The skill stops and asks in these cases:
For each step, the skill uses the first tool in the row that you have. None of them is required. If Claude has no tool for step 1, 2 or 3, it stops and asks you.
| Step | Tools |
|---|---|
| Find it | The Performance Monitor MCP server (Lite or Darling), sp_QuickieStore or sp_QuickieCache from DarlingData, or the Query Store views |
| Read the plan | The sqlserver-query-plans plugin in this marketplace, the Performance Studio MCP server, or analyze_query_plan on the Performance Monitor MCP server |
| Reproduce it | get_query_repro_script on the Performance Monitor MCP server, Copy Repro Script in Performance Monitor, or sp_QueryReproBuilder from DarlingData |
| Write variants | The sqlserver-before-you-ship plugin in this marketplace, for ideas and their trade-offs |
| Compare | dbo.CompareQueryVariants from the course, if it exists on the copy. If it does not exist, the skill uses the same method in its own T-SQL |
Steps 1 and 2 only read, and the skill tells Claude not to install anything on production. Steps 3 to 5 run queries, create indexes and drop them. The skill runs them only on the copy, which is a restored or cloned database on a server that no user depends on. The skill also tells Claude not to clear the buffer pool or the plan cache on a server that other people or other agents use.
The skill is an instruction, not a lock. Run Claude with a login that cannot change production. To block SQL writes on every server except the copy, also install the sqlserver-write-guard plugin from this marketplace.
The skill is for queries that read data. If the slow statement changes data, the skill asks you how to test it on the copy.
The skill also works in GitHub Copilot CLI:
copilot plugin install sqlserver-tune-a-query@erikdarling
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub erikdarlingdata/claude-plugins --plugin sqlserver-tune-a-queryPlugins from other owners that cover similar ground