postgresql

Analyze PostgreSQL query performance and recommend indexing and schema improvements.

Updated Sep 16, 2025
One-click install
npx skills add https://github.com/singh-gur/opencode --skill postgresql-singh-gur
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql
Source: https://github.com/singh-gur/opencode/tree/main/skills/postgresql
Command: npx skills add https://github.com/singh-gur/opencode --skill postgresql-singh-gur

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PostgreSQL performance and design optimization to reduce slow queries, improve data integrity, and streamline migrations.

Core Features & Use Cases

  • Query optimization: analyze and tune expensive queries with explain plans and indexing strategies.
  • Schema design & data types: recommend appropriate data types, constraints, and normalization choices to balance performance and maintainability.
  • Migration patterns: guidance for zero-downtime migrations, safe column changes, and robust versioning strategies.

Quick Start

Run a targeted analysis on your slow query and propose concrete indexing and plan improvements.

Frequently Asked Questions about postgresql

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

FAQPage Schema
How do I optimize slow PostgreSQL queries using explain plans?

PostgreSQL query optimization analyzes expensive queries using explain plans to identify bottlenecks and proposes concrete indexing strategies and plan improvements to reduce execution time.

What are the best practices for PostgreSQL schema design and data type selection?

PostgreSQL schema design recommends appropriate data types, constraints, and normalization choices to balance query performance with long-term maintainability and strict data integrity.

How can I perform zero-downtime PostgreSQL migrations for production databases?

PostgreSQL migration patterns provide guidance for zero-downtime migrations, safe column changes, and robust versioning strategies to update production schemas without service disruption.

Does this PostgreSQL tuning approach work for both development and production workloads?

PostgreSQL performance analysis applies to both production and development workloads, debugging performance issues, and managing migrations safely across different environments.

When should I add indexes vs rewrite SQL for PostgreSQL performance tuning?

PostgreSQL performance tuning evaluates expensive queries to determine whether indexing strategies or SQL rewrites are more effective, ensuring recommendations satisfy safe migration patterns and data-type choices.