What problem does it solve? Slow queries, missing indexes, and poorly designed schemas degrade application performance, and diagnosing them requires deep knowledge of execution plans, window functions, and dialect-specific behavior that most developers lack. ## Core Features & Use Cases - Query Optimization: Analyzes EXPLAIN/ANALYZE output, eliminates sequential scans, and creates covering indexes to hit sub-100ms targets. - Schema Design: Designs normalized schemas with proper keys, constraints, and indexing strategies. - Dialect Migration: Translates queries between PostgreSQL, MySQL, SQL Server, and Oracle while respecting platform-specific optimizations. - Use Case: A reporting query with a correlated subquery takes 30 seconds. The skill rewrites it as a set-based aggregation join, adds a covering index, and verifies the improvement with before/after EXPLAIN ANALYZE benchmarks. ## Quick Start Ask the assistant to analyze why your SQL query is slow and optimize it with proper indexes and an execution plan review.