Database Optimizer

Optimize PostgreSQL schema, queries, and indexes using EXPLAIN ANALYZE.

110|18|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/TravisLeeeeee/awesome-openclaw-personas --skill database-optimizer-travisleeeeee
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Database Optimizer
Source: https://github.com/TravisLeeeeee/awesome-openclaw-personas/tree/main/personas/engineering/database-optimizer
Command: npx skills add https://github.com/TravisLeeeeee/awesome-openclaw-personas --skill database-optimizer-travisleeeeee

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you diagnose and fix database performance issues so your application stays fast and reliable under real load.

Core Features & Use Cases

  • Optimized schema design: builds scalable tables with correct constraints and indexing (including partial and composite indexes) to match query patterns.
  • Query optimization with EXPLAIN ANALYZE: interprets execution plans and refactors queries to reduce scans, improve row estimates, and deliver measurable before/after gains.
  • Zero-downtime, reversible migrations: designs migration steps that avoid production locking while keeping rollbacks possible.
  • N+1 prevention and aggregation: replaces chatty query loops with JOINs and batch-friendly JSON aggregation to cut latency.
  • Connection pooling guidance: configures pooling approaches suitable for Postgres, PgBouncer, and Supabase transaction-mode patterns.

Quick Start

Tell the Database Optimizer skill: analyze my PostgreSQL query’s EXPLAIN ANALYZE output, propose index and query changes, and show a reversible zero-downtime migration plan.

Frequently Asked Questions about Database Optimizer

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

FAQPage Schema
How do I optimize slow PostgreSQL queries using EXPLAIN ANALYZE?

PostgreSQL query optimization uses EXPLAIN ANALYZE output to interpret execution plans, refactoring queries to reduce sequential scans and improve row estimates for measurable before/after performance gains.

What's the best way to prevent N+1 query issues in PostgreSQL?

Preventing N+1 query issues replaces chatty query loops with JOINs and batch-friendly JSON aggregation, significantly cutting application latency and reducing total database round trips.

How do I execute safe zero-downtime database migrations in production?

Safe database migrations design non-locking schema change steps that avoid production table locking while keeping rollbacks possible through reversible migration templates.

Does this database optimizer work with Supabase and PlanetScale connection pooling?

Connection pooling guidance configures pooling approaches suitable for Postgres, PgBouncer, and Supabase transaction-mode patterns to optimize database connections under load.

When do I need partial or composite indexes for PostgreSQL schema design?

Partial and composite indexes are needed for scalable schema design to match specific query patterns, ensuring correct constraints while reducing unnecessary index overhead.