postgres-expert

Optimize PostgreSQL queries and schema design using EXPLAIN ANALYZE and indexing strategies.

10|7|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/librefang/librefang-registry --skill postgres-expert-librefang
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: postgres-expert
Source: https://github.com/librefang/librefang-registry/tree/main/skills/postgres-expert
Command: npx skills add https://github.com/librefang/librefang-registry --skill postgres-expert-librefang

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL performance and administration often require expert tuning to scale, optimize queries, design schemas, and maintain production databases.

Core Features & Use Cases

  • Query optimization and plan analysis: Use EXPLAIN ANALYZE, indexing strategies, and plan inspection to improve performance.
  • Schema design and indexing strategies: Balance normalization with read performance, implement appropriate indices (B-tree, GIN, GiST), and partition large tables.
  • Production readiness and maintenance: Configure autovacuum, vacuum/ANALYZE, and performance monitoring with pg_stat_statements and related tools.
  • Use Case: You have a high-traffic OLTP dataset requiring low-latency queries and efficient storage; you apply targeted tuning to meet SLA.

Quick Start

Run an EXPLAIN ANALYZE on a slow query and apply a recommended indexing or partitioning strategy 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 PostgreSQL query performance for slow production database queries?▼

Optimize PostgreSQL query performance by running EXPLAIN ANALYZE to inspect execution plans, applying targeted indexing strategies like B-tree or GIN, and partitioning large tables to reduce latency.

What is the best way to configure autovacuum and maintenance routines in PostgreSQL?▼

Configure PostgreSQL maintenance by tuning autovacuum parameters and running routine vacuum and ANALYZE operations to manage bloat and ensure consistent production database performance.

When do I need table partitioning and specific indexing strategies in PostgreSQL?▼

You need table partitioning and indexing strategies in PostgreSQL when managing high-traffic OLTP datasets, requiring balanced normalization with read performance, and needing low-latency queries.

How does pg_stat_statements work for monitoring PostgreSQL production readiness?▼

pg_stat_statements works for monitoring PostgreSQL production readiness by tracking query execution statistics, allowing you to identify slow queries and apply guardrails for high-concurrency scenarios.

Can I use GIN and GiST indices to improve PostgreSQL query optimization on large datasets?▼

You can use GIN and GiST indices to improve PostgreSQL query optimization on large datasets by implementing appropriate indexing strategies that balance normalization with read performance.