What problem does it solve?
Writing complex SQL, optimizing slow queries, designing robust schemas, and managing database changes can be time-consuming and error-prone. This Skill automates the heavy lifting, ensuring your database operations are efficient and reliable.
Core Features & Use Cases
- Complex Query Generation: Automatically write advanced SQL queries with JOINs, CTEs, and window functions.
- Performance Optimization: Analyze
EXPLAIN plans and get recommendations for indexes and query rewrites.
- Schema Design & Migrations: Design normalized database schemas and generate safe, zero-downtime migration scripts.
- Use Case: You're tasked with optimizing a slow report query. Use this Skill to analyze the current query's
EXPLAIN plan, identify bottlenecks, and suggest optimal indexes and a rewritten, faster query.
Quick Start
Example: Optimize a slow query
EXPLAIN ANALYZE
SELECT
users.name,
COUNT(orders.id) as order_count
FROM users
LEFT JOIN orders ON users.id = orders.user_id
GROUP BY users.id, users.name;