What problem does it solve?
Slow, unscalable, or poorly structured SQL queries and database schemas that cause high latency, excessive resource usage, and unpredictable performance in production systems are diagnosed and resolved with pragmatic, reproducible improvements.
Core Features & Use Cases
- Execution Plan Analysis and Tuning: Interpret EXPLAIN/ANALYZE output, identify costly operations, and propose rewrites or index changes.
- Advanced Query Design: Build and optimize complex queries using CTEs, window functions, and set-based patterns to replace row-by-row processing.
- Indexing & Schema Guidance: Recommend covering, partial, and expression indexes, partitioning strategies, and schema changes for OLTP and OLAP workloads.
- Use Case: Convert a slow reporting query into an index-backed, CTE-based plan with platform-specific notes for PostgreSQL and MySQL and measurable before/after timings.
Quick Start
Use the sql-pro skill to analyze a slow query's EXPLAIN ANALYZE output and provide optimized SQL, index recommendations, and expected performance improvements.