db-performance-inspector

Inspect MySQL schema structures, index usage, and data distributions to diagnose performance issues.

1|Updated Dec 15, 2025
One-click install
npx skills add https://github.com/uchidayuma/sales-management-laravel-portfolio --skill db-performance-inspector
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: db-performance-inspector
Source: https://github.com/uchidayuma/sales-management-laravel-portfolio/tree/main/.claude/skills/db-performance-inspector
Command: npx skills add https://github.com/uchidayuma/sales-management-laravel-portfolio --skill db-performance-inspector

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

データベースの性能問題を特定・解決するために、スキーマ構造と現在のインデックス、データ分布を調査します。

Core Features & Use Cases

  • スキーマとインデックスの現状把握: テーブル構造と既存インデックスの効果を評価します。
  • カーディナリティとデータ分布の分析: 統計情報を基に適切なインデックス戦略を提案します。
  • 実行計画の検証と改善案の提示: slow query の EXPLAIN を用いて最適化案を導出します。
  • マイグレーション案の作成: 具体的なインデックス追加やスキーマ変更の実装コードを提案します。

Quick Start

Analyze a MySQL database to identify schema inefficiencies, index usage gaps, and slow queries, then propose concrete optimizations.

Frequently Asked Questions about db-performance-inspector

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

FAQPage Schema
How do I diagnose slow MySQL queries using EXPLAIN?

To diagnose slow MySQL queries, analyze the EXPLAIN execution plan to evaluate index effectiveness and cardinality, revealing bottlenecks where schema structures lack proper data distribution optimization.

What is the best way to analyze database indexing and cardinality for performance?

Analyzing database indexing and cardinality involves inspecting schema structures and data distributions to evaluate index effectiveness, ensuring that MySQL statistics support optimal query performance for production workloads.

How do I generate migration-ready code to add missing database indexes?

Generate migration-ready code by identifying schema inefficiencies and slow queries, then proposing concrete index additions and schema optimizations as implementation code to resolve database performance issues.

Can I use this approach for MySQL databases in production workloads?

Yes, this approach targets MySQL databases in production workloads, directly analyzing current index usage, data distributions, and slow queries to propose schema optimizations without disrupting existing structures.

What causes high cardinality indexes to underperform in MySQL?

High cardinality indexes underperform in MySQL when schema structures and data distributions are misaligned, making index effectiveness poor despite high cardinality, requiring execution plan verification to diagnose.

When should I not add indexes to optimize slow queries?

You should not add indexes to optimize slow queries when existing index usage is already effective, as unnecessary indexing increases write overhead and storage without improving MySQL query performance.