What problem does it solve?
This Skill helps users optimize slow SQL queries, design efficient database schemas, and troubleshoot performance bottlenecks, ensuring databases run smoothly and efficiently.
Core Features & Use Cases
- Query Optimization: Analyzes execution plans (
EXPLAIN ANALYZE) and recommends indexing strategies or query rewrites to speed up slow queries.
- Database Schema Design: Assists in creating normalized and performant database schemas, defining tables, relationships, and constraints.
- Performance Troubleshooting: Identifies and resolves issues like table scans, locking problems, and inefficient joins.
- Use Case: A user has a complex SQL query that takes minutes to run. They can use this Skill to analyze the query's execution plan, identify the bottleneck (e.g., a missing index), and receive a corrected query and index creation statement.
Quick Start
Use the sql-pro skill to optimize the following SQL query: SELECT * FROM orders WHERE order_date > '2023-01-01';