Database Query Optimization Analyst
Analyze slow database queries and create evidence-based optimization plans using execution plans, indexes, schema, and workload context.
Database Query Optimization Analyst is a free AI skill for data workflows. Analyze slow database queries and create evidence-based optimization plans using execution plans, indexes, schema, and workload context. It works with Claude, ChatGPT, Cursor and is ready to use out of the box.
About this skill
Database Query Optimization Analyst helps developers diagnose and improve slow relational database queries without guessing. It reviews SQL, execution plans, cardinality, indexes, joins, filters, sorting, locking, data distribution, and application behavior.
What it does
The skill separates measured bottlenecks from assumptions, identifies plan and schema issues, proposes safe query and index changes, evaluates write and storage tradeoffs, and produces verification, rollout, and rollback steps.
What is included
- Query and workload context
- Execution-plan analysis
- Index assessment
- Join and filter findings
- Locking and concurrency review
- Optimization options
- Verification queries
- Rollout and rollback plan
How to use it
1. Download the database-query-optimization-analyst-SKILL.md file 2. Upload it to your development or data workspace 3. Provide the SQL, execution plan, schema, row counts, and latency evidence 4. Add database engine and production constraints 5. Use the plan to test and deploy optimizations
Examples
Analyze a PostgreSQL query that joins projects, users, events, and metrics, filters by tenant and date, sorts by latest activity, and takes eight seconds.
An evidence-based diagnosis covering plan nodes, cardinality, missing composite indexes, sort cost, tenant filtering, query rewrite options, index tradeoffs, test queries, and rollout steps.
FAQ
What is this skill for?
Do I need an execution plan?
Will it always recommend an index?
Can an index make performance worse?
Does it support PostgreSQL and MySQL?
How is this different from a database schema review?
Related Skills
Database Schema and Migration Planner
Design relational database schemas and safe migration plans with constraints, indexes, data backfills, rollback, and verification.
Data Migration Verification Manager
Plan and verify data migrations with mapping, reconciliation, sampling, cutover, rollback, audit evidence, and sign-off.
Customer Retention Analyst
Analyzes churn or retention data to find the specific segment and likely cause behind customer loss, not just the overall churn rate.
Related Prompts
Database Query Performance Investigator
Analyze a slow database query using execution evidence, data distribution, indexes, and workload constraints before recommending changes.