performance-tuning

Analyze PostgreSQL query plans and statistics to identify performance bottlenecks.

Updated Feb 7, 2026
One-click install
npx skills add https://github.com/jsamuelsen11/claude-config --skill performance-tuning-jsamuelsen11
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-tuning
Source: https://github.com/jsamuelsen11/claude-config/tree/main/plugins/ccfg-postgresql/skills/performance-tuning
Command: npx skills add https://github.com/jsamuelsen11/claude-config --skill performance-tuning-jsamuelsen11

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL performance tuning helps DBAs and engineers identify bottlenecks, optimize query execution plans, and tune configuration to improve throughput and reduce latency.

Core Features & Use Cases

  • EXPLAIN ANALYZE interpretation to locate bottlenecks and guide optimizations.
  • Indexing, VACUUM/Autovacuum tuning, and memory configuration (shared_buffers, work_mem, maintenance_work_mem) to optimize common workloads.
  • Partitioning, connection pooling considerations, and pg_stat monitoring to sustain performance in production and analytics scenarios.

Quick Start

Run a representative workload through EXPLAIN ANALYZE, interpret the plan, apply targeted index and memory adjustments, and verify improvements on staging before production.

Frequently Asked Questions about performance-tuning

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

FAQPage Schema
How do I find PostgreSQL query bottlenecks using EXPLAIN ANALYZE?

PostgreSQL query bottlenecks are identified by running a representative workload through EXPLAIN ANALYZE to interpret execution plans, measure query statistics, and locate slow operations. This data-driven approach guides targeted optimizations for improving throughput and reducing latency.

What are the best PostgreSQL memory settings for tuning query performance?

PostgreSQL memory tuning involves adjusting shared_buffers, work_mem, and maintenance_work_mem to optimize common workloads. These settings directly impact query execution speed and overall database throughput when configured appropriately for your specific data patterns.

When should I tune autovacuum settings in PostgreSQL to improve performance?

PostgreSQL autovacuum tuning is needed when dead tuples accumulate and degrade query throughput. Adjusting VACUUM and autovacuum configurations sustains production performance by ensuring efficient bloat cleanup and maintaining up-to-date query planner statistics.

Can I apply PostgreSQL indexing and partitioning optimizations directly in production?

PostgreSQL indexing and partitioning changes should be validated with before and after metrics on a staging environment before production rollout. This data-driven validation ensures query latency improvements are confirmed without risking production stability.

Does PostgreSQL connection pooling affect query performance tuning?

PostgreSQL connection pooling is a core performance consideration alongside indexing and memory configuration. Proper pooling sustains production database performance by managing concurrent query execution and preventing resource exhaustion during high-throughput analytics workloads.

How do I monitor PostgreSQL performance statistics after applying tuning changes?

PostgreSQL performance monitoring relies on pg_stat statistics to track query throughput and latency after tuning adjustments. This validates that indexing, memory configuration, and autovacuum optimizations are actively improving production workload performance.