Slow Query Analyzer
Identify and fix slow database queries by analyzing logs, execution plans, and access patterns.
Usage
Share your slow query log entries or problematic queries and this skill will analyze and suggest fixes.
Examples
- "Analyze my PostgreSQL slow query log and find the top offenders"
- "This query takes 5 seconds, help me understand why"
- "Identify queries causing lock contention in my application"
Guidelines
- Start with the queries consuming the most total time, not just the slowest
- Check for missing indexes on filtered and joined columns
- Look for N+1 query patterns from the application layer
- Consider query result caching for frequently repeated queries
- Monitor query performance trends over time, not just point-in-time