Query Optimization
Diagnose and fix slow SQL queries using EXPLAIN ANALYZE, proper indexing, query rewriting, and N+1 detection.
When to Use
- User reports slow database queries
- User asks about EXPLAIN ANALYZE output
- User needs to optimize query performance
- User has N+1 query problems in an ORM
- User asks about index tuning or covering indexes
Core Patterns
EXPLAIN ANALYZE
Always start with EXPLAIN ANALYZE to understand what the database is actually doing.
-- Basi
[Description truncada. Veja o README completo no GitHub.]