🐌

Slow Query Analyzer

Verified

by Community

Analyzes slow query logs to identify problematic queries and suggest fixes. Covers query profiling, missing index detection, lock contention analysis, and query rewriting strategies for PostgreSQL, MySQL, and other databases.

slowqueryperformanceanalysisdatabaseoptimization

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