postgres-expert

Analyze PostgreSQL query plans and recommend indexing strategies.

18.1k|2.3k|Updated Feb 24, 2026
One-click install
npx skills add https://github.com/RightNow-AI/openfang --skill postgres-expert-rightnow-ai
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-expert
Source: https://github.com/RightNow-AI/openfang/tree/main/crates/openfang-skills/bundled/postgres-expert
Command: npx skills add https://github.com/RightNow-AI/openfang --skill postgres-expert-rightnow-ai

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses challenges in PostgreSQL database performance, query optimization, schema design, and administration, ensuring efficient and scalable database operations.

Core Features & Use Cases

  • Query Optimization: Analyzes query plans and suggests index strategies for faster execution.
  • Schema Design: Provides guidance on normalization and denormalization for optimal read/write performance.
  • Database Administration: Offers advice on vacuuming, analyzing, and managing database resources.
  • Use Case: A developer struggling with slow-running reports can use this Skill to identify bottlenecks and receive actionable advice on improving query speed and database efficiency.

Quick Start

Analyze the query plan for the following SQL statement: EXPLAIN (ANALYZE, BUFFERS) SELECT * FROM users WHERE created_at > '2023-01-01';

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 PostgreSQL query plan to identify performance bottlenecks?

PostgreSQL query optimization starts by running EXPLAIN (ANALYZE, BUFFERS) on your statement to inspect the query plan, revealing execution time, index usage, and buffer hits to pinpoint bottlenecks for tuning.

What is the best way to design a PostgreSQL schema for optimal read and write performance?

Schema design for PostgreSQL performance involves strategically applying normalization and denormalization to structure tables, ensuring efficient data storage and balancing heavy read or write workloads effectively.

Why does PostgreSQL query performance degrade and what indexing strategies can fix it?

PostgreSQL performance degrades due to missing indexes or outdated statistics; analyzing the query planner helps implement targeted indexing strategies to accelerate slow-running reports and complex data retrieval.

Do I need to understand MVCC and database internals to tune PostgreSQL administration tasks?

Yes, effective PostgreSQL administration requires understanding MVCC and database internals to properly manage vacuuming, analyze database resources, and maintain efficient data storage operations.

How does pg_stat_statements work for monitoring PostgreSQL query performance?

pg_stat_statements tracks execution statistics for PostgreSQL queries, providing data on query frequency and resource consumption to guide performance tuning and identify statements requiring optimization.