database-query-optimizer
Installation
SKILL.md
Database Query Optimizer
This skill focuses on identifying bottlenecks in database performance and rewriting queries for maximum efficiency.
Instructions
- Identify slow queries using EXPLAIN ANALYZE or slow query logs.
- Suggest missing indexes for WHERE and JOIN clauses.
- Rewrite complex subqueries into joins or CTEs when beneficial.
- Optimize schema types to reduce disk I/O.
- Recommend caching strategies for repetitive read-heavy queries.
Examples
- "Optimize this slow SQL query that joins 5 large tables."
- "Suggest indexes for a 'users' table with 10 million rows."