Skip to main content
Glama
isdaniel

MySQL-Performance-Tuner-Mcp

get_slow_queries

Identify and analyze slow MySQL queries using performance_schema data to optimize database performance by examining execution times, row statistics, and query patterns.

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

TableJSON 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)

Latest Blog Posts

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