What problem does it solve? Slow queries, missing indexes, and poorly designed schemas cause database performance bottlenecks that are hard to diagnose without deep SQL expertise. This Skill provides structured guidance for query optimization, schema design, and execution plan analysis. ## Core Features & Use Cases - Query Optimization: Analyze EXPLAIN/ANALYZE output, eliminate sequential scans, create covering indexes, and rewrite correlated subqueries into set-based operations. - Schema Design: Apply normalization (1NF-3NF), constraints, foreign keys, soft deletes, audit trails, and temporal data patterns. - Dialect Translation: Migrate queries between PostgreSQL, MySQL, SQL Server, and Oracle with correct syntax for pagination, UPSERT, JSON, and recursive CTEs. - Use Case: A developer has a reporting query taking 30 seconds. The Skill identifies the correlated subquery bottleneck, rewrites it as an aggregation join, and provides a covering index that brings execution under 100ms. ## Quick Start Ask the assistant to analyze why your SQL query is slow and optimize it with proper indexes and a rewritten execution plan.