| name | query-optimizer |
| description | Review SQL queries, execution plans, schema usage, and indexes to propose safer faster alternatives. Use when a database query is slow or causing load problems. |
Query Optimizer
Overview
Review SQL queries, execution plans, schema usage, and indexes to propose safer faster alternatives.
Core Workflow
- Inspect the relevant diffs, configs, source files, or artifacts before forming a conclusion.
- Compare the current state against repo conventions, expected guarantees, and known risk areas.
- Prioritize the highest-impact gaps, regressions, or improvement opportunities instead of surface-level noise.
- Recommend the smallest high-leverage changes and the checks that would validate them.
Deliver
- Ranked findings or improvement opportunities with clear evidence.
- The main risks, tradeoffs, or regressions that matter most.
- Validation steps or follow-up edits that would reduce risk.
Guardrails
- Lead with findings, not generic praise or low-value commentary.
- Use repo evidence and surrounding context instead of reviewing in isolation.
- Flag missing validation when a recommendation depends on behavior you could not confirm.
- Prefer repository evidence, command output, and nearby tests over vague intuition.