postgres-expert

Analyze and optimize PostgreSQL queries, indexing, and configuration.

Updated Dec 5, 2025
One-click install
npx skills add https://github.com/botPhU/project-An-English-speaking-practice-platform-supported-by-AI --skill postgres-expert-botphu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-expert
Source: https://github.com/botPhU/project-An-English-speaking-practice-platform-supported-by-AI/tree/main/.agent/skills/postgres-expert
Command: npx skills add https://github.com/botPhU/project-An-English-speaking-practice-platform-supported-by-AI --skill postgres-expert-botphu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL databases often suffer from suboptimal query performance, complex indexing decisions, and challenging configuration for high-availability setups. This Skill provides guidance on optimizing queries, leveraging JSONB, advanced indexing, partitioning, connection management, and replication.

Core Features & Use Cases

  • Query optimization: Analyze and tune slow queries with proper indexes and planner settings.
  • JSONB & indexing: Efficiently search and filter JSONB data with correct index types.
  • Partitioning & maintenance: Implement partitioning strategies and maintenance routines for large datasets.
  • Replication & HA: Configure replication, replication slots, and PgBouncer for connection pooling.

Quick Start

Start with a quick assessment of a slow query, then apply recommended indexing and configuration steps to improve performance.

Frequently Asked Questions about postgres-expert

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

FAQPage Schema
How do I optimize slow PostgreSQL queries?

To optimize slow PostgreSQL queries, you should analyze the query execution plans, apply targeted indexing strategies, and adjust planner settings to resolve performance bottlenecks efficiently.

What is the best way to index JSONB data in PostgreSQL?

The best way to index JSONB data in PostgreSQL is by selecting the correct index types to efficiently search and filter nested JSON structures without triggering full table scans.

How does PgBouncer connection pooling work with PostgreSQL replication?

PgBouncer manages connection pooling by queuing client connections, which works alongside PostgreSQL replication settings and replication slots to ensure high-availability for high-traffic applications.

When do I need partitioning for large PostgreSQL datasets?

You need partitioning for large PostgreSQL datasets when managing maintenance routines becomes challenging, allowing you to segment data tables for faster query targeting and easier archival.

Can I use this for high-availability replicated setups?

Yes, you can use this for high-availability replicated setups as it provides concrete configuration requirements for replication settings, replication slots, and PgBouncer connection management.