neon-postgres-egress-optimizer

Diagnose PostgreSQL data egress using pg_stat_statements query analytics.

5|1|Updated Feb 11, 2026
One-click install
npx skills add https://github.com/Tristan578/project-forge --skill neon-postgres-egress-optimizer
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: neon-postgres-egress-optimizer
Source: https://github.com/Tristan578/project-forge/tree/main/.agents/skills/neon-postgres-egress-optimizer
Command: npx skills add https://github.com/Tristan578/project-forge --skill neon-postgres-egress-optimizer

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reduce costly data egress from PostgreSQL by identifying queries that transfer large volumes of data or wide columns and applying targeted fixes to minimize transfer and cost.

Core Features & Use Cases

  • Query analytics with pg_stat_statements to identify top egress contributors and unbounded queries.
  • Code and schema review to ensure selective column projection, proper pagination, and avoidance of unnecessary wide fields.
  • Cost-aware optimizations including pagination, caching, and SQL-level aggregation to cut data transfer in APIs, dashboards, and batch jobs.

Quick Start

Run the diagnostic workflow against your Neon PostgreSQL deployment to identify egress-heavy queries and begin applying fixes.

Frequently Asked Questions about neon-postgres-egress-optimizer

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

FAQPage Schema
How do I reduce Postgres egress costs from expensive queries?

Postgres egress costs are driven by queries that transfer wide rows or unbounded datasets. You can reduce them by analyzing query statistics with pg_stat_statements and applying targeted SQL rewrites, pagination, and caching.

What causes high data egress in a Neon Postgres deployment?

High data egress in Neon Postgres is typically caused by unbounded queries and wide column projections in APIs, dashboards, or batch jobs that transfer unnecessary data out of the database.

How do I use pg_stat_statements to find queries causing high egress?

You use pg_stat_statements to collect query statistics and identify top egress contributors. The diagnostic workflow checks extension readiness, gathers data, and highlights queries transferring large volumes of data.

Can I optimize PostgreSQL data transfer for API endpoints and dashboards?

Yes, you can optimize PostgreSQL data transfer for APIs and dashboards by applying cost-aware optimizations like SQL-level aggregation, proper pagination, and caching to cut unnecessary data transfer.

Do I need to install pg_stat_statements before diagnosing egress issues?

Yes, pg_stat_statements is required for diagnosing egress issues because the optimization workflow enforces extension readiness and relies on it to collect the necessary query statistics.