analyzing-query-performance

Analyze EXPLAIN plans and query metrics to identify database bottlenecks.

2.6k|379|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus --skill analyzing-query-performance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: analyzing-query-performance
Source: https://github.com/jeremylongshore/claude-code-plugins-plus/tree/main/plugins/database/query-performance-analyzer/skills/query-performance-analyzer
Command: npx skills add https://github.com/jeremylongshore/claude-code-plugins-plus --skill analyzing-query-performance

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve?

This skill empowers Claude to act as a database performance expert. By analyzing EXPLAIN plans and query metrics, Claude can pinpoint inefficiencies and recommend targeted improvements to database queries, improving execution speed and resource utilization.

Core Features & Use Cases

  • EXPLAIN Plan Interpretation: Automatically interpret complex EXPLAIN plans to identify bottlenecks.
  • Bottleneck Identification: Detect full table scans, missing indexes, and inefficient joins.
  • Optimization Recommendations: Suggest new indexes, query rewrites, or configuration adjustments.
  • Use Case: Provide an EXPLAIN plan for a slow query and receive specific recommendations to make it run faster.

Quick Start

User request: "Here's the EXPLAIN plan for my slow query. Can you help me optimize it? EXPLAIN SELECT * FROM orders WHERE customer_id = 123 AND order_date > '2023-01-01';"

The skill will:

  1. Analyze the provided EXPLAIN plan using the query-performance-analyzer plugin.
  2. Identify potential issues, such as a missing index on customer_id or order_date, and suggest creating appropriate indexes.

Frequently Asked Questions about analyzing-query-performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze an EXPLAIN plan to find slow queries?

EXPLAIN plans show how a database executes queries. Analyze them to identify bottlenecks like full table scans, missing indexes, and inefficient joins. This skill interprets those plans and recommends specific optimizations such as adding indexes or rewriting the query for faster execution.

What causes slow database queries and how do I fix them?

Slow queries often stem from missing indexes, full table scans, or inefficient joins. Query performance analysis identifies these issues in your SQL statements and suggests concrete fixes—new indexes, query rewrites, or configuration adjustments—to improve execution speed and reduce resource usage.

Can I optimize queries without rewriting them?

Yes. Adding indexes on columns used in WHERE clauses or joins often resolves performance issues without changing the query itself. Performance analysis identifies which indexes are missing and recommends their creation as a first optimization step.

How do I know if my database queries are inefficient?

Use EXPLAIN to see your query's execution plan. If it shows full table scans, sequential operations, or high cost estimates, the query is inefficient. Performance analysis interprets these metrics and pinpoints exactly which parts are slow and why.

What's the best way to optimize SQL query performance?

Start by analyzing the EXPLAIN plan to identify the actual bottleneck—often missing indexes or inefficient joins. Then apply targeted optimizations: add indexes, rewrite the query logic, or adjust database configuration. This data-driven approach fixes the root cause, not symptoms.

Do I need to know SQL to improve query performance?

Understanding basic SQL helps, but query performance analysis identifies bottlenecks in EXPLAIN plans without requiring deep SQL expertise. The skill explains what's slow and recommends specific fixes you can implement or pass to your database team.