Skip to main content
Glama

PostgreSQL-Performance-Tuner-Mcp

find_unused_indexes

Identify unused, duplicate, and overlapping PostgreSQL indexes to reduce storage space and improve database performance by removing unnecessary indexes.

Instructions

Find indexes that are not being used or are duplicates.

Identifies:

  • Indexes with zero or very few scans since last stats reset

  • Duplicate indexes (same columns in same order)

  • Overlapping indexes (one index is a prefix of another)

Removing unused indexes can:

  • Reduce storage space

  • Speed up INSERT/UPDATE/DELETE operations

  • Reduce vacuum and maintenance overhead

Input Schema

NameRequiredDescriptionDefault
schema_nameNoSchema to analyze (default: public)public
min_size_mbNoMinimum index size in MB to include
max_scan_ratioNoMaximum scan ratio (scans/rows) to consider an index unused
include_duplicatesNoInclude analysis of duplicate/overlapping indexes

Input Schema (JSON Schema)

{ "properties": { "include_duplicates": { "default": true, "description": "Include analysis of duplicate/overlapping indexes", "type": "boolean" }, "max_scan_ratio": { "default": 0.01, "description": "Maximum scan ratio (scans/rows) to consider an index unused", "type": "number" }, "min_size_mb": { "default": 0, "description": "Minimum index size in MB to include", "type": "number" }, "schema_name": { "default": "public", "description": "Schema to analyze (default: public)", "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