Optimizes database performance by analyzing execution plans and rewriting SQL queries to eliminate anti-patterns and improve speed.
The SQL Query Optimizer skill empowers Claude Code to act as a database performance engineer, transforming slow queries into high-performance SQL. By analyzing execution plans from PostgreSQL and MySQL, it identifies critical bottlenecks such as unnecessary sequential scans, inefficient JOINs, and suboptimal subqueries. The skill provides automated rewrites using modern SQL features like window functions and lateral joins, generates precise index recommendations, and validates improvements with measurable performance metrics, making it an essential tool for developers troubleshooting database latency and high I/O overhead.
主要功能
01Strategic index recommendations based on query predicates and data distribution.
02Comprehensive execution plan analysis for PostgreSQL and MySQL databases.
03Advanced query restructuring using window functions, CTEs, and lateral joins.
04Automated SQL rewriting to eliminate anti-patterns like SELECT * and inefficient subqueries.
05Performance benchmarking providing before-and-after metrics comparisons for execution time and buffer usage.
060 GitHub stars
使用场景
01Modernizing legacy SQL code to utilize high-performance modern database features.
02Diagnosing and resolving latency in slow-running production database queries.
03Reducing server load by optimizing resource-intensive aggregation and reporting queries.