PostgreSQL

Optimize PostgreSQL queries, schemas, indexing, and database performance.

Updated Feb 22, 2026
One-click install
npx skills add https://github.com/mattstyles333/openclaw-workspace --skill postgresql-mattstyles333
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: PostgreSQL
Source: https://github.com/mattstyles333/openclaw-workspace/tree/main/skills/pg
Command: npx skills add https://github.com/mattstyles333/openclaw-workspace --skill postgresql-mattstyles333

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps users write more efficient PostgreSQL queries, design better database schemas with proper indexing, and avoid common performance pitfalls.

Core Features & Use Cases

  • Query Optimization: Analyze and improve the performance of SQL queries.
  • Schema Design: Advise on effective indexing strategies, data types, and table structures.
  • Troubleshooting: Identify and resolve issues related to database bloat, connection management, and transaction isolation.
  • Use Case: Improve the speed of a slow-running report by optimizing its underlying PostgreSQL query and ensuring appropriate indexes are in place.

Quick Start

Use the PostgreSQL skill to explain the execution plan for the query 'SELECT * FROM users WHERE status = 'active';'.

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?

To optimize slow PostgreSQL queries, you must analyze the execution plan and apply proper indexing strategies. This Skill guides you in rewriting inefficient SQL query patterns and selecting appropriate index types to improve database performance.

What is the best way to design a PostgreSQL schema for performance?

Designing a PostgreSQL schema for performance requires selecting optimal data types and structuring tables effectively. This Skill advises on schema design and indexing strategies to avoid common performance pitfalls and ensure efficient data retrieval.

Why does PostgreSQL database bloat happen and how do I fix it?

PostgreSQL database bloat happens due to inefficient vacuuming and transaction management, degrading query performance. This Skill helps troubleshoot and resolve bloat by guiding you through proper vacuuming and transaction isolation level configurations.

How do I analyze a PostgreSQL execution plan using EXPLAIN?

Analyzing a PostgreSQL execution plan involves using query analysis to identify bottlenecks in SQL operations. This Skill explains how to interpret execution plans and optimize query patterns for tasks like full-text search and complex filtering.

When should I use connection pooling in PostgreSQL?

You should use connection pooling in PostgreSQL to manage database connections efficiently and prevent performance bottlenecks during high traffic. This Skill provides guidance on connection management and troubleshooting isolation levels.