database-optimizer — Claude Code plugin for SQL query tuning
database-optimizer looks at SQL execution plans and suggests indexes. Use it when a query against your database got slow.
Apache-2.0 ★ 2,858 updated 2026-05-12
/plugin marketplace add rohitg00/awesome-claude-code-toolkit
/plugin install database-optimizer@claude-code-toolkitWhat database-optimizer does
The plugin examines a query and shows how the database runs it. EXPLAIN output reveals the execution plan: full table scans, missing indexes, join order. From that, database-optimizer works out which index would stop the query from dragging.
It comes from the plugin marketplace for Claude Code. Add the repo rohitg00/awesome-claude-code-toolkit, then install the plugin and use it in your session.
You need access to the database you are debugging. The plugin does not connect by itself — you hand it the query and the schema. If EXPLAIN in your database behaves differently, the advice may miss.
What it helps with
- spot the slow part of a SQL query
- read the execution plan from EXPLAIN
- get an index recommendation
- find out why a table gets a full scan
- tune a query without parsing the plan by hand
Example prompts for the agent
- Show the execution plan for this query and tell me what index to add
- Optimize the query on the
orderstable — here is the schema and the query - Explain why this
SELECTonuser_idis slow
How to install database-optimizer
Plugin marketplace
/plugin marketplace add rohitg00/awesome-claude-code-toolkit/plugin install database-optimizer@claude-code-toolkitStep by step, with commands for each platform: Claude Code plugins: marketplaces, installing, and building your own
Questions about database-optimizer
How do I install database-optimizer in Claude Code?
Run /plugin marketplace add rohitg00/awesome-claude-code-toolkit, then /plugin install database-optimizer@claude-code-toolkit.
What does database-optimizer do?
It analyzes SQL queries through EXPLAIN and suggests indexes. It helps you find why a query runs slowly.
Does the plugin connect to my database by itself?
No. You pass the query and schema information, and the plugin analyzes them. It does not open a connection to your database.
Source text
database-optimizer · Apache-2.0
Database query optimization with index recommendations and EXPLAIN analysis
© rohitg00 · Apache-2.0 · rohitg00/awesome-claude-code-toolkit