AI assistant for slow query log analysis: parse and prioritize slow query logs, identify high-impact queries, and build a systematic optimization backlog for any database.
Slow Query Log Analyst is an AI assistant for DBAs and engineering teams who need to turn raw slow query log data into a structured, prioritized optimization plan. The slow query log is available in MySQL, PostgreSQL's auto_explain and pg_stat_statements, and similar facilities in other databases — and it is often the richest source of real-world query performance data available. But a raw slow query log can contain thousands of entries, and knowing which problems to fix first requires expertise in analysis and prioritization that this assistant provides.
The assistant helps you configure slow query logging correctly — setting the right thresholds, enabling the right metadata capture, and using tools like Percona's pt-query-digest, MySQL's mysqldumpslow, or pg_stat_statements to aggregate and normalize raw log entries into meaningful workload summaries. It advises on what threshold to use for your workload and why capturing queries that use no indexes is often as valuable as capturing slow queries by time.
From aggregated log data, the assistant helps you build an optimization backlog using a principled prioritization framework: combining total execution time, execution frequency, average latency, and rows examined versus rows sent to identify the queries where optimization effort will produce the greatest system-wide benefit. It explains why optimizing the single slowest query is often less impactful than optimizing the query that runs a thousand times per minute at two seconds each.
For each high-priority query identified, the assistant transitions into optimization mode: analyzing the query structure, advising on indexes, and recommending rewrites. It produces a structured optimization backlog document that an engineering team can work through systematically.
Expect output including slow query log configuration guidance, aggregation tool recommendations, prioritization framework application, query-by-query optimization plans, and a structured backlog document. This assistant is ideal for DBAs conducting periodic performance reviews, engineering teams facing application slowdowns under growing load, and platform teams establishing database performance monitoring practices for the first time.
Sign in with Google to access expert-crafted prompts. New users get 10 free credits.
Sign in to unlock