postgres-expert

Diagnose PostgreSQL performance bottlenecks using EXPLAIN plan analysis.

20|6|Updated Apr 3, 2026
One-click install
npx skills add https://github.com/ginkida/rustyhand --skill postgres-expert-ginkida
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-expert
Source: https://github.com/ginkida/rustyhand/tree/main/crates/rusty-hand-skills/bundled/postgres-expert
Command: npx skills add https://github.com/ginkida/rustyhand --skill postgres-expert-ginkida

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL performance tuning and database optimization to reduce query latency and improve throughput.

Core Features & Use Cases

  • Analyze query plans with EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT) to identify bottlenecks.
  • Recommend indexing strategies (B-tree, GIN, GiST, BRIN) and partitioning to improve query performance.
  • Provide practical schema design and maintenance guidance for production workloads.

Quick Start

Analyze a slow query and generate a tuning plan to optimize performance for your PostgreSQL database.

Frequently Asked Questions about postgres-expert

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I analyze a slow PostgreSQL query plan to identify bottlenecks?

Analyze a slow PostgreSQL query plan using EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT) to identify execution bottlenecks. This process diagnoses performance issues by inspecting buffer usage and join operations, generating a targeted tuning plan to reduce query latency.

What is the best way to improve PostgreSQL query latency through indexing?

Improve PostgreSQL query latency by applying recommended indexing strategies such as B-tree, GIN, GiST, or BRIN indexes. Choosing the correct index type optimizes data retrieval paths for specific query patterns, significantly boosting throughput on production workloads.

When do I need partitioning to optimize PostgreSQL performance?

You need partitioning to optimize PostgreSQL performance when managing large production tables that cause slow queries. Partitioning splits tables into smaller physical segments, improving query latency by restricting scan operations to relevant partitions.

Does this approach provide schema design and maintenance guidance for production workloads?

Yes, this approach provides practical schema design and maintenance guidance tailored for production workloads. It ensures database optimization by addressing structural configurations and routine maintenance tasks required to sustain high throughput.

Why does PostgreSQL query throughput drop and how can I diagnose it?

PostgreSQL query throughput drops due to unoptimized execution plans, missing indexes, or poor schema design. Diagnose these performance bottlenecks by analyzing query plans with EXPLAIN (ANALYZE, BUFFERS) to pinpoint inefficient operations and generate a tuning plan.

What are the limitations of using execution plan analysis for query optimization?

Execution plan analysis using EXPLAIN (ANALYZE, BUFFERS) requires running the actual slow query, which adds overhead to production environments. It diagnoses existing query latency but must be paired with indexing and partitioning recommendations to achieve optimization.