Skip to main content
Glama
isdaniel

PostgreSQL-Performance-Tuner-Mcp

analyze_query

Analyze SQL query execution plans to identify performance bottlenecks, examine timing breakdowns, and receive optimization recommendations using PostgreSQL's EXPLAIN ANALYZE functionality.

Instructions

Analyze a SQL query's execution plan and performance characteristics.

Uses EXPLAIN ANALYZE to execute the query and capture detailed timing information. Provides analysis of:

  • Execution plan with actual vs estimated rows

  • Timing breakdown by operation

  • Buffer usage and I/O statistics

  • Potential performance issues and recommendations

WARNING: This actually executes the query! For SELECT queries this is safe, but be careful with INSERT/UPDATE/DELETE - use analyze_only=false for those.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe SQL query to analyze
analyzeNoWhether to actually execute the query (EXPLAIN ANALYZE vs EXPLAIN)
buffersNoInclude buffer usage statistics
verboseNoInclude verbose output with additional details
formatNoOutput format for the execution planjson
settingsNoInclude information about configuration parameters

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/pgtuner-mcp'

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