postgresql-optimization

Optimize PostgreSQL queries, indexes, and configuration parameters.

150|51|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/AratKruglik/claude-laravel --skill postgresql-optimization-aratkruglik
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: postgresql-optimization
Source: https://github.com/AratKruglik/claude-laravel/tree/main/.claude/skills/postgresql-optimization
Command: npx skills add https://github.com/AratKruglik/claude-laravel --skill postgresql-optimization-aratkruglik

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill addresses slow database queries and performance bottlenecks in PostgreSQL, ensuring efficient data retrieval and application responsiveness.

Core Features & Use Cases

  • Query Tuning: Analyzes and optimizes slow-running SQL queries using EXPLAIN ANALYZE.
  • Indexing Strategies: Recommends and implements optimal indexing for faster data access.
  • Configuration Tuning: Adjusts PostgreSQL parameters like shared_buffers and work_mem for better resource utilization.
  • Maintenance: Schedules and manages essential tasks like VACUUM and ANALYZE.
  • Use Case: When your e-commerce application experiences slow product searches, this Skill can identify the problematic queries, suggest appropriate indexes, and tune the database configuration to speed up search results significantly.

Quick Start

Use the postgresql-optimization skill to analyze and tune the performance of the 'products' table.

Frequently Asked Questions about postgresql-optimization

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

FAQPage Schema
How do I optimize slow PostgreSQL queries?

Optimize slow PostgreSQL queries by analyzing execution plans with EXPLAIN ANALYZE to identify bottlenecks, applying indexing strategies for faster data retrieval, and adjusting configuration parameters like shared_buffers for better resource allocation.

What is the best way to improve PostgreSQL database performance for an e-commerce application?

Improve PostgreSQL database performance by identifying problematic product search queries, recommending optimal indexes for faster data access, and tuning database configuration to significantly speed up search results and application responsiveness.

How does configuring PostgreSQL parameters like shared_buffers and work_mem affect performance?

Configuring PostgreSQL parameters like shared_buffers and work_mem affects performance by adjusting database resource allocation, which enables better memory utilization for query processing and ensures more efficient overall data retrieval.

When should I schedule VACUUM and ANALYZE maintenance tasks in PostgreSQL?

Schedule VACUUM and ANALYZE maintenance tasks in PostgreSQL regularly to manage database bloat and update statistics, ensuring the query planner has accurate data to maintain efficient retrieval and consistent application responsiveness.

Do I need PostgreSQL internals expertise to tune database configuration parameters?

Yes, tuning database configuration parameters requires expertise in PostgreSQL internals, SQL optimization patterns, and performance monitoring tools to effectively address suboptimal resource allocation and inefficient data retrieval scenarios.