mysql-performance

Diagnose slow MySQL queries using EXPLAIN and slow query logs.

Updated Mar 7, 2026
One-click install
npx skills add https://github.com/billyfranklim1/claude-skills --skill mysql-performance
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mysql-performance
Source: https://github.com/billyfranklim1/claude-skills/tree/main/plugins/mysql-performance/skills/mysql-performance
Command: npx skills add https://github.com/billyfranklim1/claude-skills --skill mysql-performance

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Helps engineers quickly identify and remediate MySQL performance bottlenecks by analyzing active queries, slow query logs, EXPLAIN plans, and configuration metrics so that production Laravel applications stop being slowed by inefficient queries or misconfigured buffers.

Core Features & Use Cases

  • Query triage: Inspect SHOW PROCESSLIST, find long-running queries and safely kill or cancel problematic statements.
  • Slow log analysis: Enable and analyze the slow query log, surface top time-consuming statements, and prioritize fixes.
  • Execution plan review: Use EXPLAIN, EXPLAIN FORMAT=JSON, and EXPLAIN ANALYZE to detect full table scans, filesorts, and large row estimates.
  • Safe index changes: Recommend and craft non-blocking index strategies including inplace/online ALTER alternatives and using pt-online-schema-change or gh-ost for large tables.
  • Laravel-specific diagnostics: Detect N+1 queries, leverage query listeners or Telescope, and suggest caching with Redis for heavy aggregated results.
  • Operational guardrails: Advise on InnoDB buffer pool sizing, deadlock inspection, and never running risky commands like OPTIMIZE TABLE without a maintenance window.

Quick Start

Ask the skill to analyze the MySQL slow query log and EXPLAIN the top slow queries with recommended safe index and configuration changes for production.

Frequently Asked Questions about mysql-performance

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

FAQPage Schema
How do I find slow MySQL queries causing high latency in my Laravel application?

To find slow MySQL queries, enable the slow query log and inspect SHOW PROCESSLIST for long-running statements. This skill analyzes those logs to surface top time-consuming queries and prioritizes remediation steps for your Laravel application.

How do I use EXPLAIN ANALYZE to detect full table scans in MySQL 8?

Use EXPLAIN, EXPLAIN FORMAT=JSON, and EXPLAIN ANALYZE to review MySQL execution plans and detect full table scans, filesorts, and large row estimates. This identifies inefficient query paths causing high latency on MySQL 8 servers.

What is the best way to add non-blocking indexes to large MySQL tables in production?

The best way to add non-blocking indexes to large MySQL tables is using online ALTER alternatives or tools like pt-online-schema-change and gh-ost. This skill crafts safe index strategies to avoid locking production tables during schema changes.

How do I detect N+1 query problems in a Laravel application?

Detect N+1 query problems in Laravel by leveraging query listeners or Laravel Telescope to monitor repeated query execution. This skill diagnoses these inefficient patterns and suggests caching heavy aggregated results with Redis.

How should I size the InnoDB buffer pool to improve MySQL performance?

Size the InnoDB buffer pool based on your dataset and available memory to improve MySQL performance. This skill provides operational guardrails and tuning guidance for buffer pool configuration to prevent excessive disk I/O and query latency.

Why should I avoid running OPTIMIZE TABLE on a production MySQL database?

You should avoid running OPTIMIZE TABLE on production MySQL because it locks the table and causes downtime. This skill enforces operational guardrails, advising against risky commands outside maintenance windows and focusing on safe remediation instead.