SQL Query Optimizer

•
8
•

Optimizes complex SQL queries by identifying bottlenecks, suggesting indexing strategies, and rewriting code for peak performance.

SQL Query Optimizer acts as a Senior Database Administrator within Claude Code to transform slow, inefficient database operations into high-performance queries. It meticulously analyzes execution patterns to identify anti-patterns such as non-sargable predicates, implicit type conversions, and inefficient joins. Beyond simple rewrites, the skill provides specific indexing recommendations—including B-Tree, GIN, and GiST—and offers schema refactoring advice tailored to major engines like PostgreSQL, MySQL, and SQL Server. It is an essential tool for developers needing to reduce database latency and improve application scalability through set-based logic and optimized execution plans.

主要功能

01Comparative analysis of query complexity before and after optimization
02Detection of SQL anti-patterns like leading wildcards and non-sargable predicates
03Engine-specific optimizations for PostgreSQL, MySQL, SQL Server, and Oracle
04Automated query rewriting for set-based logic and improved execution plans
058 GitHub stars
06Tailored indexing strategies including covering and specialized indexes

使用场景

01Designing efficient indexing strategies for high-traffic database tables
02Refactoring slow-running legacy queries to improve application response times
03Troubleshooting N+1 query problems and inefficient subqueries in application code