neon-postgres-egress-optimizer

Diagnose and fix excessive Postgres egress using pg_stat_statements.

83|14|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/neondatabase/agent-skills --skill neon-postgres-egress-optimizer-neondatabase
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: neon-postgres-egress-optimizer
Source: https://github.com/neondatabase/agent-skills/tree/main/skills/neon-postgres-egress-optimizer
Command: npx skills add https://github.com/neondatabase/agent-skills --skill neon-postgres-egress-optimizer-neondatabase

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill helps diagnose and fix excessive Postgres egress (network data transfer), reducing data transfer costs and optimizing database usage.

Core Features & Use Cases

  • Diagnose Excessive Egress: Identify queries transferring the most data.
  • Analyze Codebase: Check for unused columns, missing pagination, and inefficient queries.
  • Fix Issues: Apply fixes for egress anti-patterns like SELECT *, missing pagination, and high-frequency queries on static data.
  • Verify Improvements: Confirm no issues and measure the improvement in egress after applying fixes.

Quick Start

Run the skill to optimize Postgres egress and reduce data transfer costs by following the diagnostic and fix steps provided in the SKILL.md file.

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 high Postgres egress data transfer costs?

To reduce high Postgres egress data transfer costs, you must optimize queries by identifying inefficient data retrieval patterns like SELECT *, adding missing pagination, and applying structural changes to minimize network data transfer.

Why does my Postgres database have excessive egress from specific queries?

Your Postgres database has excessive egress from specific queries because of anti-patterns like unoptimized SELECT * statements, missing pagination on large result sets, or high-frequency queries fetching static data that could be cached or structurally optimized.

Do I need the pg_stat_statements extension to diagnose Postgres egress issues?

Yes, you need the pg_stat_statements extension enabled in your PostgreSQL database, as this Skill relies on it to identify which queries are transferring the most data and diagnose excessive network data transfer.

What is the best way to identify which queries are causing database egress?

The best way to identify queries causing database egress is to analyze your codebase alongside query statistics to check for unused columns, missing pagination, and inefficient data retrieval patterns that drive up network data transfer.

How do I verify Postgres query optimization improvements after fixing egress anti-patterns?

You verify Postgres query optimization improvements by measuring the reduction in egress after applying fixes to anti-patterns, confirming that no remaining inefficient data retrieval patterns are causing excessive network data transfer.