postgres-performance

Analyze PostgreSQL query execution plans and optimize database performance.

8|2|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/bradtaylorsf/alphaagent-team --skill postgres-performance-bradtaylorsf
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-performance
Source: https://github.com/bradtaylorsf/alphaagent-team/tree/main/plugins/aai-stack-postgres/skills/postgres-performance
Command: npx skills add https://github.com/bradtaylorsf/alphaagent-team --skill postgres-performance-bradtaylorsf

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill addresses slow database queries and inefficient PostgreSQL performance by providing tools and strategies for analysis and optimization.

Core Features & Use Cases

  • Query Analysis: Understand query execution plans using EXPLAIN ANALYZE and identify bottlenecks.
  • Connection Pooling: Configure and implement connection pooling with PgBouncer or application-level pools.
  • Query Optimization: Learn best practices for writing efficient SQL, including pagination and batch operations.
  • Table Maintenance: Manage table bloat and update statistics with VACUUM and ANALYZE.
  • Configuration Tuning: Adjust memory, checkpoint, and parallelism settings for better performance.
  • Monitoring: Track active queries and table access patterns.
  • Use Case: A developer notices their application's database queries are becoming slow. They use this Skill to analyze the EXPLAIN ANALYZE output of a problematic query, identify a missing index, and then apply the optimization.

Quick Start

Use the postgres-performance skill to analyze the query plan for 'SELECT * FROM orders WHERE user_id = 123;'.

Frequently Asked Questions about postgres-performance

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

FAQPage Schema
How do I analyze slow PostgreSQL queries using EXPLAIN ANALYZE?

To analyze slow PostgreSQL queries, use EXPLAIN ANALYZE to review execution plans and identify bottlenecks like missing indexes. This Skill helps interpret the output to pinpoint and resolve performance issues efficiently.

What's the best way to configure connection pooling in PostgreSQL with PgBouncer?

Configuring connection pooling in PostgreSQL with PgBouncer manages active database connections to prevent bottlenecks. This Skill guides setting up PgBouncer or application-level pools to maintain query throughput.

Why does PostgreSQL table bloat happen and when should I run VACUUM and ANALYZE?

PostgreSQL table bloat happens due to dead tuples accumulating from updates and deletes. You should run VACUUM and ANALYZE regularly to reclaim storage and update statistics for the query planner.

Do I need to understand PostgreSQL internals to tune memory and checkpoint settings?

Yes, tuning PostgreSQL memory, checkpoint, and parallelism settings requires understanding PostgreSQL internals and system configuration parameters. This Skill provides the necessary strategies to adjust these configurations safely.

How do I optimize SQL query writing for pagination and batch operations in PostgreSQL?

To optimize SQL query writing for pagination and batch operations in PostgreSQL, apply best practices for efficient SQL execution. This Skill demonstrates techniques to reduce overhead and speed up data retrieval.