Database Optimizer follows a measure-first routine. It captures baseline metrics and an execution plan, finds the bottleneck, applies one change at a time and re-measures.
The skill includes queries to find the slowest statements with pg_stat_statements, a guide to reading EXPLAIN output, covering index examples and MySQL digest queries.
What You Get
- A performance analysis with baseline metrics and EXPLAIN evidence
- Identified bottlenecks and root causes
- An optimization strategy with specific index, query and config changes
- Implementation SQL
- Validation queries and monitoring recommendations
Common Use Cases
- Finding and fixing the slowest queries
- Designing a covering index
- Tuning PostgreSQL or MySQL configuration
- Reducing lock contention
- Planning table partitioning
What Makes It Unique
It forbids optimizing without a measured baseline and forbids making several changes at once, since the impact could not be attributed. Indexes are created with CONCURRENTLY on PostgreSQL to avoid table locks. References cover query optimization, indexes, PostgreSQL, MySQL and monitoring.
Under The Hood
The skill is a SKILL.md with five reference files and no scripts. It gives the agent SQL to run against your database, including EXPLAIN ANALYZE, which executes the query, and statements that create indexes and run ANALYZE, so it can change a live database if pointed at one. The skill warns to test in non-production first. It does not fetch web pages or call outside APIs.