postgresql-expert

Administer PostgreSQL databases with advanced queries, performance tuning, and production operations.

Updated Feb 27, 2026
One-click install
npx skills add https://github.com/JonathanMitchell1234/Stock-Swing-Trading-Bot --skill postgresql-expert-jonathanmitchell1234
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql-expert
Source: https://github.com/JonathanMitchell1234/Stock-Swing-Trading-Bot/tree/main/.agents/skills/postgresql-expert
Command: npx skills add https://github.com/JonathanMitchell1234/Stock-Swing-Trading-Bot --skill postgresql-expert-jonathanmitchell1234

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses complex challenges in PostgreSQL database management, including performance bottlenecks, intricate query optimization, and robust administration tasks.

Core Features & Use Cases

  • Advanced Querying: Write and optimize complex SQL queries using window functions, CTEs, and lateral joins.
  • Performance Tuning: Identify and resolve performance issues through index optimization, query plan analysis, and vacuuming strategies.
  • Database Administration: Manage backups, replication, transactions, and locking for production environments.
  • Use Case: Optimize a slow-running report by analyzing its query plan, adding appropriate indexes, and rewriting inefficient parts of the query.

Quick Start

Use the postgresql-expert skill to analyze the performance of the following query: SELECT * FROM users WHERE email = '[email protected]';

Frequently Asked Questions about postgresql-expert

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

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

PostgreSQL query optimization uses EXPLAIN and ANALYZE to inspect query plans, identify sequential scans, and apply indexing strategies or rewrite SQL using window functions and lateral joins to resolve performance bottlenecks.

What is the best way to manage PostgreSQL transaction isolation and locking mechanisms?

PostgreSQL transaction isolation and locking mechanisms are managed by selecting appropriate isolation levels and understanding lock modes to prevent concurrency issues, ensuring robust administration for production database environments.

How do I write recursive CTEs and use full-text search in PostgreSQL?

Recursive CTEs in PostgreSQL are written using the WITH RECURSIVE clause to traverse hierarchical data, while full-text search utilizes tsvector and tsquery data types to execute complex text matching operations efficiently.

When do I need to run vacuuming procedures in a PostgreSQL database?

PostgreSQL vacuuming procedures are needed to reclaim storage from dead tuples, update query planner statistics, and prevent transaction ID wraparound, ensuring consistent performance tuning and operational health.

How do I set up PostgreSQL backup and replication procedures for production environments?

PostgreSQL backup and replication procedures are set up by configuring continuous WAL archiving for point-in-time recovery and establishing streaming replication to maintain high availability across production environments.

Can I use PostgreSQL advanced indexing strategies for high-volume reporting workloads?

PostgreSQL advanced indexing strategies support high-volume reporting workloads by utilizing B-tree, GIN, and GiST indexes to accelerate complex query filtering, joining, and full-text search operations.