Skip to main content
Glama

MySQL-Performance-Tuner-Mcp

get_slow_queries

Identify and analyze slow MySQL queries with execution statistics, table scan data, and performance metrics to optimize database performance.

Instructions

Retrieve slow queries from MySQL performance_schema.

Returns the top N slowest queries with detailed statistics:

  • Total execution time

  • Number of calls

  • Average execution time

  • Rows examined vs rows sent

  • Full table scans

  • Temporary tables usage

Requires performance_schema to be enabled (default in MySQL 5.6+). For older versions, use the slow query log instead.

Note: This tool excludes queries against MySQL system schemas (mysql, information_schema, performance_schema, sys) to focus on user/application query performance.

Input Schema

NameRequiredDescriptionDefault
limitNoMaximum number of slow queries to return (default: 10)
min_exec_time_msNoMinimum total execution time in milliseconds (default: 0)
order_byNoColumn to order results bytotal_time
schema_nameNoFilter by schema/database name (optional)

Input Schema (JSON Schema)

{ "properties": { "limit": { "default": 10, "description": "Maximum number of slow queries to return (default: 10)", "maximum": 100, "minimum": 1, "type": "integer" }, "min_exec_time_ms": { "default": 0, "description": "Minimum total execution time in milliseconds (default: 0)", "type": "number" }, "order_by": { "default": "total_time", "description": "Column to order results by", "enum": [ "total_time", "avg_time", "calls", "rows_examined" ], "type": "string" }, "schema_name": { "description": "Filter by schema/database name (optional)", "type": "string" } }, "required": [], "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