
Database Performance Tuning Analyzer
Identify and fix database performance issues with AI-driven diagnostics
What You Can Do
You can systematically diagnose database performance bottlenecks by sharing your schema, slow query logs, and execution plans with Claude. It identifies root causes—missing indexes, inefficient joins, lock contention—and provides prioritized recommendations with ready-to-implement SQL. Skip the manual log analysis and get tuning strategies tailored to your workload.
Features
Parses EXPLAIN output to identify sequential scans, expensive joins, and nested loop inefficiencies
Suggests composite, covering, and partial indexes based on actual query patterns
Detects anti-patterns like missing primary keys, improper normalization, and suboptimal data types
Pinpoints blocking queries, deadlocks, and transaction isolation problems from logs
Categorizes queries by read/write ratio and complexity to prioritize optimization efforts
Evaluates sizing, connection wait times, and leak detection
Assesses buffer pool hit ratios and cache efficiency metrics
Quantifies performance gains from applied optimizations
Example Output
Query Performance Analysis
- 🔴 CRITICAL: SELECT orders.* FROM orders
JOIN customers ON orders.customer_id = customers.id
WHERE orders.created_at > '2024-01-01'
Execution time: 12.4 seconds (target: <1 second)
Issue: Seq scan on orders table (1.2M rows)
Missing index on (created_at, customer_id)
CREATE INDEX idx_orders_created_customer
ON orders(created_at DESC, customer_id)
INCLUDE (id, total);
Expected improvement: 8-10x faster
Lock Contention Report
- ⚠️ MEDIUM: High lock wait time on accounts table
Wait queue: 23 transactions
Average wait: 340ms
Root cause: Long-running UPDATE in background job
Solution: Break updates into smaller batches
Estimated impact: Reduce wait from 340ms → 12ms
What's Included
- SKILL.md: Complete database performance diagnostic workflow
- Query Analysis Template: Standardized checklist for evaluating execution plans
- Index Recommendation Worksheet: Step-by-step index optimization process
- Schema Review Checklist: Anti-patterns and remediation strategies
- Diagnostic Query Reference: Pre-built queries for PostgreSQL, MySQL, SQL Server
- Performance Measurement Guide: How to quantify optimization impact
- Lock and Contention Diagnostic Workbook: Common patterns and solutions
Who It's For
- Database Administrators — Diagnose and resolve production performance issues
- Performance Engineers — Systematize query tuning and indexing strategies
- Backend Engineers — Identify inefficient queries before deployment
- DevOps Engineers — Troubleshoot database performance during incident response
- Solutions Architects — Plan optimization roadmaps and capacity strategy
Best For
- Production incident response — Quickly diagnose slow queries causing outages
- Query optimization projects — Methodically improve application performance
- Index strategy development — Design optimal indexes for your workload
- Capacity planning — Defer infrastructure upgrades through optimization
- Performance regression diagnosis — Analyze unexpected query slowdowns






