The SQL Query Optimizer acts as a virtual Senior Database Administrator within Claude Code, transforming slow and inefficient SQL into high-performance code. It meticulously identifies database anti-patterns—such as non-sargable predicates, implicit type conversions, and unnecessary joins—while providing tailored advice for specific engines like PostgreSQL, MySQL, and SQL Server. By suggesting precise indexing strategies and structural schema improvements, it helps developers reduce latency, lower computational costs, and scale data-intensive applications more effectively.
主要功能
01Suggests specific indexing strategies including B-Tree, Hash, GIN, and GiST
028 GitHub stars
03Analyzes execution plans to explain exactly why a query is underperforming
04Generates optimized SQL rewrites and efficient set-based logic
05Identifies performance anti-patterns like leading wildcards and non-sargable predicates
06Provides engine-specific optimizations for PostgreSQL, MySQL, and SQL Server
使用场景
01Resolving N+1 query problems and inefficient subqueries in application code
02Designing optimal indexing strategies for new application schemas
03Refactoring slow legacy queries to reduce production database load