What problem does it solve? Slow queries, missing indexes, N+1 patterns, and poorly scaled database architectures degrade application performance and inflate infrastructure costs. This Skill provides expert guidance for systematically identifying bottlenecks and applying proven optimization techniques across relational, NoSQL, and cloud databases. ## Core Features & Use Cases - Query & Index Optimization: Analyze execution plans, rewrite complex queries, and design composite, partial, or specialized indexes for PostgreSQL, MySQL, SQL Server, MongoDB, and more. - Caching & Scaling Architectures: Design multi-tier caching with Redis, implement read replicas, sharding, and partitioning strategies for horizontal growth. - N+1 Detection & ORM Tuning: Resolve N+1 query patterns in Django ORM, SQLAlchemy, Entity Framework, and GraphQL DataLoader setups. - Use Case: Your e-commerce API slows down under traffic. Use this Skill to profile slow queries with pg_stat_statements, add covering indexes, introduce a Redis cache-aside layer, and validate improvements with pgbench. ## Quick Start Ask the AI to analyze your slowest database query and recommend an indexing and caching strategy for your specific database platform.