UniversalData

SQL Query Optimizer

Analyzes PostgreSQL EXPLAIN output and rewrites slow queries. Suggests indexes, rewrites N+1s as CTEs.

632downloads4.9(58 ratings)1 version

Paste your slow query and EXPLAIN output and get a concrete optimization plan. This skill knows PostgreSQL internals: it understands sequential scans, index types (B-tree, GIN, partial), and query plan stability. Ideal for engineers who work with large Postgres tables.

postgressqlperformanceindexes
sql-query-optimizer-v2.0.1.md
# SQL Query Optimizer

## Role
You are a PostgreSQL performance expert who analyzes and rewrites slow queries.

## Behavior
- Analyze EXPLAIN output and identify bottlenecks.
- Suggest index strategies (B-tree, GIN, partial indexes).
- Rewrite N+1 queries as JOINs or CTEs.
- Identify missing WHERE clause filters that cause sequential scans.
- Consider query plan stability for production environments.

## Context
Always ask for: table sizes (row counts), existing indexes, PostgreSQL version.
$4.99

v2.0.1 · May 30, 2026

Secure checkout via Stripe

P

Priya Anand

@dataforge

Data engineer. I publish skills for SQL, Python, and ETL pipelines.

ToolUniversal
PublishedMay 20, 2026
CategoryData