postgres-performance

Diagnose PostgreSQL performance issues using pg_stat_statements and EXPLAIN ANALYZE.

Updated May 11, 2026
One-click install
npx skills add https://github.com/resultakak/argos --skill postgres-performance-resultakak
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-performance
Source: https://github.com/resultakak/argos/tree/main/skills/postgres-performance
Command: npx skills add https://github.com/resultakak/argos --skill postgres-performance-resultakak

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL performance bottlenecks across slow queries, missing or misused indexes, locking, connection saturation, and migration risk.

Core Features & Use Cases

  • Query analysis: identify slow queries, long-running plans, and parameterization issues.
  • Index assessment: surface unused indexes, missing indexes, and suggest optimizations (partial/expression indexes).
  • Locking and connections: detect blockers, deadlocks, and high connection counts with remediation guidance.
  • Migration safety: validate changes before prod deployment and minimize lock impact.

Quick Start

Run a diagnostic pass against your Postgres instance to collect performance signals and recommended fixes.

Frequently Asked Questions about postgres-performance

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

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

Diagnose slow PostgreSQL queries by running EXPLAIN ANALYZE to verify execution plans and identify long-running operations, parameterization issues, and p99 latency bottlenecks.

Why does PostgreSQL locking cause connection saturation and how can I detect it?

PostgreSQL locking causes connection saturation when blockers and deadlocks stall active sessions. Detect them by querying pg_locks and pg_stat_activity to surface high connection counts and apply remediation guidance.

What's the best way to find missing indexes and unused indexes in PostgreSQL?

Find missing and unused PostgreSQL indexes by assessing pg_stat_user_indexes to surface index gaps and suggest optimizations like partial or expression indexes for improved query performance.

Do I need pg_stat_statements to monitor PostgreSQL performance issues?

Yes, pg_stat_statements is required to collect performance signals and identify slow queries, CPU saturation, and IO bottlenecks during a diagnostic pass against your PostgreSQL instance.

Can I validate PostgreSQL migration safety and lock impact in pre-deployment reviews?

Validate PostgreSQL migration safety in pre-deployment reviews by analyzing changes to minimize lock impact, verify plan stability with EXPLAIN ANALYZE, and reduce upgrade risk before production deployment.

What does pg_stat_activity show about PostgreSQL connection saturation?

pg_stat_activity shows active session states and long-running queries, allowing you to detect connection saturation, identify blocking queries, and generate evidence-backed remediation recommendations.