postgres-expert

Optimize PostgreSQL queries, schema design, indexing, and database administration.

Updated Feb 26, 2026
One-click install
npx skills add https://github.com/gagan114662/exp --skill postgres-expert-gagan114662
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-expert
Source: https://github.com/gagan114662/exp/tree/main/crates/openfang-skills/bundled/postgres-expert
Command: npx skills add https://github.com/gagan114662/exp --skill postgres-expert-gagan114662

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenges of optimizing PostgreSQL database performance, ensuring efficient query execution, robust schema design, and effective administration for production workloads.

Core Features & Use Cases

  • Query Optimization: Analyzes query plans and applies indexing strategies for improved speed.
  • Schema Design: Guides on normalization and denormalization tradeoffs for read/write performance.
  • Database Administration: Provides best practices for vacuuming, monitoring, and connection pooling.
  • Use Case: A developer struggling with slow-running reports can use this Skill to identify and fix inefficient queries, leading to faster data retrieval and a better user experience.

Quick Start

Analyze the query plan for the following SQL statement: EXPLAIN (ANALYZE, BUFFERS, FORMAT TEXT) 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 optimize slow PostgreSQL queries using EXPLAIN ANALYZE?

To optimize slow PostgreSQL queries, run EXPLAIN ANALYZE to review the execution plan and identify sequential scans. This Skill analyzes query plans and applies indexing strategies to improve execution speed and resolve suboptimal query patterns.

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

Schema design for balanced PostgreSQL performance requires evaluating normalization and denormalization tradeoffs. This Skill guides you through structuring tables to support efficient query execution while maintaining robust read and write performance.

When should I use indexing strategies to fix PostgreSQL performance issues?

Indexing strategies are needed when PostgreSQL query plans show inefficient execution patterns like full table scans. This Skill identifies incorrect index usage and applies targeted indexes to significantly improve data retrieval speed.

How does pg_stat_statements help with PostgreSQL database administration and monitoring?

Pg_stat_statements tracks query execution statistics to help monitor PostgreSQL performance. This Skill provides database administration best practices for vacuuming, monitoring, and connection pooling to maintain production-ready configurations.

Why does my PostgreSQL query plan show a sequential scan instead of using an index?

A sequential scan in a PostgreSQL query plan often indicates incorrect or missing index usage. This Skill analyzes EXPLAIN ANALYZE output to identify suboptimal query patterns and applies proper indexing to fix the execution path.

Can I use this Skill to tune PostgreSQL configurations for production workloads?

Yes, this Skill provides production-ready PostgreSQL configurations and database administration best practices. It addresses vacuuming, monitoring, and connection pooling to ensure efficient query execution under production workloads.