What problem does it solve?
This Skill helps developers and DBAs diagnose and fix slow database queries by interpreting EXPLAIN plans, identifying N+1 patterns, recommending indexes, and validating measurable latency improvements while accounting for write trade-offs.
Core Features & Use Cases
- EXPLAIN analysis: Parse EXPLAIN and EXPLAIN ANALYZE output to surface sequential scans, nested loops, misestimated row counts, and disk-based sorts.
- Index recommendations: Suggest appropriate index types (B-tree, GIN, BRIN, partial, covering) and production-safe creation patterns such as concurrent indexing with explicit write-cost guidance.
- ORM & N+1 remediation: Identify N+1 query patterns from ORM traces and propose eager-loading, joins, or raw SQL rewrites plus verification steps.
- Verification and safety: Provide repeatable EXPLAIN runs, median timing checks, test-suite validation, stop conditions, and rollback guidance to prevent regressions.
- Use case: Speed up a user-facing API endpoint by removing N+1s and adding targeted indexes while ensuring write performance remains acceptable.
Quick Start
Ask the skill to analyze the slow SQL or ORM trace and recommend specific index and query changes to hit your target latency.