Skip to main content
Glama

MySQL-Performance-Tuner-Mcp

analyze_query

Analyze MySQL query execution plans to identify performance bottlenecks, index usage, and optimization opportunities using EXPLAIN and EXPLAIN ANALYZE.

Instructions

Analyze a MySQL query's execution plan using EXPLAIN.

Provides detailed analysis of:

  • Query execution plan with access types

  • Index usage and potential missing indexes

  • Join types and optimization opportunities

  • Rows examined estimates

  • Key usage and key length

Supports EXPLAIN FORMAT=JSON for MySQL 5.6+ for detailed cost analysis. Use EXPLAIN ANALYZE (MySQL 8.0.18+) for actual execution statistics.

WARNING: With analyze=true, the query is actually executed!

Input Schema

NameRequiredDescriptionDefault
queryYesThe SQL query to analyze
analyzeNoUse EXPLAIN ANALYZE to get actual execution stats (MySQL 8.0.18+)
formatNoOutput format for the execution planjson

Input Schema (JSON Schema)

{ "properties": { "analyze": { "default": false, "description": "Use EXPLAIN ANALYZE to get actual execution stats (MySQL 8.0.18+)", "type": "boolean" }, "format": { "default": "json", "description": "Output format for the execution plan", "enum": [ "traditional", "json", "tree" ], "type": "string" }, "query": { "description": "The SQL query to analyze", "type": "string" } }, "required": [ "query" ], "type": "object" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/isdaniel/MySQL-Performance-Tuner-Mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server