postgres-expert

Analyze PostgreSQL queries with EXPLAIN ANALYZE and recommend indexing strategies.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/vTajae/0x000026 --skill postgres-expert-vtajae
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-expert
Source: https://github.com/vTajae/0x000026/tree/main/crates/openfang-skills/bundled/postgres-expert
Command: npx skills add https://github.com/vTajae/0x000026 --skill postgres-expert-vtajae

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses challenges in PostgreSQL database performance, query efficiency, schema design, and operational administration, ensuring databases run optimally.

Core Features & Use Cases

  • Query Optimization: Analyzes and rewrites SQL queries for maximum performance using EXPLAIN ANALYZE.
  • Indexing Strategies: Recommends and implements appropriate index types (B-tree, GIN, GiST, BRIN) based on access patterns.
  • Schema Design: Guides on normalization and denormalization trade-offs for balanced read/write performance.
  • Database Administration: Provides advice on vacuuming, partitioning, connection pooling, and locking mechanisms.
  • Use Case: A developer struggling with slow report generation can use this Skill to identify bottlenecks, optimize a complex query, and add a covering index to drastically reduce query times.

Quick Start

Use the postgres-expert skill to analyze the query plan for '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?

PostgreSQL query optimization uses EXPLAIN ANALYZE to identify execution bottlenecks and rewrite SQL for maximum performance. This process reveals how the query planner handles complex joins and filters, allowing you to restructure queries for faster execution.

What is the best way to choose PostgreSQL index types for my database?

Choosing PostgreSQL index types involves matching B-tree, GIN, GiST, or BRIN structures to specific access patterns. Selecting the right index strategy ensures efficient data retrieval and drastically reduces query times based on how your application queries the data.

How does PostgreSQL MVCC affect vacuuming and database administration?

PostgreSQL MVCC creates multiple row versions requiring regular vacuuming to reclaim storage and prevent transaction ID wraparound. Proper administration of vacuuming and locking mechanisms maintains operational efficiency and prevents database bloat.

When do I need table partitioning in PostgreSQL schema design?

Table partitioning in PostgreSQL schema design is needed when managing large datasets to balance read and write performance. Evaluating normalization and denormalization trade-offs alongside partitioning strategies optimizes efficient data storage for high-volume tables.

Why does my PostgreSQL database experience locking issues during heavy writes?

PostgreSQL locking issues during heavy writes occur due to concurrent transaction conflicts and MVCC overhead. Analyzing query plans and implementing connection pooling helps manage concurrency, reducing lock contention and improving overall throughput.