postgres-best-practices

Apply PostgreSQL optimization rules to tune queries, indexes, and configurations.

Updated Mar 17, 2026
One-click install
npx skills add https://github.com/HemantSudarshan/Dhumichatbot --skill postgres-best-practices-hemantsudarshan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgres-best-practices
Source: https://github.com/HemantSudarshan/Dhumichatbot/tree/main/skills/02-data/postgres-best-practices
Command: npx skills add https://github.com/HemantSudarshan/Dhumichatbot --skill postgres-best-practices-hemantsudarshan

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL performance issues often arise from poorly optimized queries, missing or inefficient indexes, and suboptimal use of advanced features like JSONB, CTEs, window functions, or connection management.

Core Features & Use Cases

  • Provides a structured set of rules across 8 priority categories to guide automated query optimization and schema design.
  • Includes guidance on query performance, indexing strategies, JSONB best practices, CTE usage, window functions, and connection pooling.
  • Use cases include tuning slow queries, designing efficient indexes, enabling advanced Postgres features, and scaling connections for concurrent workloads.

Quick Start

Start by applying the top-priority rules to your slow-running queries to yield immediate performance gains.

Frequently Asked Questions about postgres-best-practices

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

FAQPage Schema
How do I optimize slow PostgreSQL queries?

PostgreSQL query optimization involves applying structured rules across indexing strategies and configuration tuning to resolve slow performance. Implementation-ready guidance with specific safeguards ensures reliable production deployment and immediate performance gains.

What are the best practices for PostgreSQL indexing strategies?

PostgreSQL indexing best practices involve applying structured optimization rules to design efficient indexes for slow queries. Implementation-ready guidance ensures reliable production deployment while resolving query performance issues.

How should I use JSONB columns efficiently in PostgreSQL?

Efficient JSONB usage in PostgreSQL requires applying specific optimization rules for schema design and query tuning. Implementation-ready guidance with production safeguards ensures advanced features perform reliably without bottlenecks.

When should I use CTEs and window functions in PostgreSQL?

CTEs and window functions in PostgreSQL should be used following optimization rules for complex query performance tuning. Structured guidance ensures advanced features are implemented with production safeguards for reliable deployment.

Does this guidance cover connection pooling for concurrent PostgreSQL workloads?

Yes, PostgreSQL connection pooling is covered to scale connections for concurrent workloads. Optimization rules provide implementation-ready guidance to tune connection configurations for reliable production deployment.

Can I use these PostgreSQL optimization rules for production deployment?

Yes, PostgreSQL optimization rules include specific safeguards for reliable production deployment. Implementation-ready guidance spans query tuning, indexing, JSONB, CTEs, window functions, and connection management scenarios.