Skip to main content
Glama

PostgreSQL-Performance-Tuner-Mcp

get_table_stats

Analyze PostgreSQL table statistics to identify maintenance needs and performance issues. Get table sizes, row counts, scan ratios, and vacuum history to optimize database performance.

Instructions

Get detailed statistics for database tables.

Returns information about:

  • Table size (data, indexes, total)

  • Row counts and dead tuple ratio

  • Last vacuum and analyze times

  • Sequential vs index scan ratios

  • Cache hit ratios

This helps identify tables that may need maintenance (VACUUM, ANALYZE) or have performance issues.

Input Schema

NameRequiredDescriptionDefault
schema_nameNoSchema to analyze (default: public)public
table_nameNoSpecific table to analyze (optional, analyzes all tables if not provided)
include_indexesNoInclude index statistics
order_byNoOrder results by this metricsize

Input Schema (JSON Schema)

{ "properties": { "include_indexes": { "default": true, "description": "Include index statistics", "type": "boolean" }, "order_by": { "default": "size", "description": "Order results by this metric", "enum": [ "size", "rows", "dead_tuples", "seq_scans", "last_vacuum" ], "type": "string" }, "schema_name": { "default": "public", "description": "Schema to analyze (default: public)", "type": "string" }, "table_name": { "description": "Specific table to analyze (optional, analyzes all tables if not provided)", "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/pgtuner-mcp'

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