← Catalog

No. 049 · databases

PostgreSQL Best Practices

Indexing, queries, and performance tuning

Version 1.0.0 License MIT Format SKILL.md

Write efficient PostgreSQL: indexing strategies (B-tree, GIN, GiST), query optimization with EXPLAIN ANALYZE, connection pooling, partitioning, and common anti-patterns to avoid.

When to use this skill

  • Optimizing a slow PostgreSQL query
  • Choosing an index type
  • Analyzing a query plan

Core concepts

This skill provides guidance on postgresql best practices best practices, patterns, and common pitfalls. It is designed to be loaded on demand when a relevant task is detected.

Installation

curl -LO https://opencode-skills.example/downloads/databases/postgres-best-practices.zip
unzip postgres-best-practices.zip -d ~/.config/opencode/skills/

Restart OpenCode — the skill loads automatically.

When it triggers

  • optimizing a slow PostgreSQL query
  • choosing an index type
  • analyzing a query plan