postgres-expert

Optimize PostgreSQL queries, indexing, JSONB, partitioning, and replication.

Updated Jan 21, 2026
One-click install
npx skills add https://github.com/mahamaneharouna9-cpu/Apex-invoice-billing-automation --skill postgres-expert-mahamaneharouna9-cpu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-expert
Source: https://github.com/mahamaneharouna9-cpu/Apex-invoice-billing-automation/tree/main/.opencode/skill/postgres-expert
Command: npx skills add https://github.com/mahamaneharouna9-cpu/Apex-invoice-billing-automation --skill postgres-expert-mahamaneharouna9-cpu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses complex PostgreSQL performance bottlenecks, advanced feature utilization, and database administration challenges, ensuring optimal database health and efficiency.

Core Features & Use Cases

  • Query Optimization: Analyzes and optimizes slow-running SQL queries using EXPLAIN ANALYZE.
  • Advanced Indexing: Recommends and implements optimal index strategies (B-tree, GIN, GiST, BRIN) for various data types and query patterns.
  • JSONB & Partitioning: Provides solutions for efficient JSONB operations and table partitioning for large datasets.
  • Connection Management: Helps configure and tune PgBouncer for efficient connection pooling.
  • Replication & HA: Assists in setting up and monitoring PostgreSQL replication for high availability.
  • Use Case: Troubleshoot a slow e-commerce API endpoint by analyzing query plans, identifying missing indexes, and tuning PostgreSQL configuration parameters for better throughput.

Quick Start

Use the postgres-expert skill to analyze the performance of the query 'SELECT * FROM orders WHERE order_date > ''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 optimize slow PostgreSQL queries using EXPLAIN ANALYZE?

PostgreSQL query optimization involves analyzing slow-running SQL queries using `EXPLAIN ANALYZE` to identify performance bottlenecks, missing indexes, and inefficient query plans for better throughput.

When do I need table partitioning or JSONB operations in PostgreSQL?

Table partitioning in PostgreSQL is needed for managing large datasets efficiently, while JSONB operations allow structured data manipulation. Both advanced features ensure optimal database health when handling complex data types.

What is the best way to configure PgBouncer for PostgreSQL connection pooling?

Configuring PgBouncer for PostgreSQL connection pooling involves tuning connection management parameters to handle high client concurrency, reducing database overhead and ensuring efficient connection reuse.

How do I set up PostgreSQL replication for high availability?

Setting up PostgreSQL replication for high availability requires configuring primary and standby servers, monitoring replication status, and ensuring data consistency across nodes to prevent downtime.

What are the best indexing strategies for PostgreSQL performance tuning?

PostgreSQL indexing strategies recommend implementing B-tree, GIN, GiST, or BRIN indexes based on specific data types and query patterns to significantly accelerate data retrieval and overall database performance.