Skip to main content

PostgresAI vs PgHero

history and wait events vs a performance dashboard

PgHero is an open-source Postgres dashboard for slow queries and index suggestions. PostgresAI keeps history, samples wait events and files findings as Issues with a fix.

See plans and pricingOpen the live demoTalk to us

Checked on against 9 pages of PgHero documentation. PostgreSQL only. Markdown

Where PostgresAI is ahead of PgHero​

Each point pairs what our documentation says with what the PgHero documentation says. Follow the links and check.

  1. Test the fix on a full-size copy first

    PostgresAI

    With DBLab Engine, a separate open-source product, an index or query change runs on a full-size thin clone of the database, created in seconds, before it reaches production. docsdocs 2

    PgHero

    PgHero estimates suggested indexes from pg_stat_statements and pg_stats, and its Explain page runs EXPLAIN, with ANALYZE opt-in, on the database it connects to. The sources we reviewed do not describe testing a change on a separate copy. 52

  2. 13 months of history

    PostgresAI

    Scale keeps 13 months of history. docs

    PgHero

    PgHero history is optional: you create tables and schedule tasks that capture query stats every 5 minutes and space stats once a day, and remove old rows with a cleanup task. 23

  3. An AI agent can work through the findings

    PostgresAI

    The postgresai CLI and an MCP server give an agent the Issues, action items and checkup reports. The setup guide covers Cursor, Claude Code, Windsurf and Codex. docsdocs 2

    PgHero

    PgHero has a /health endpoint for health checks, and version 4.0 dropped its Ruby API. The sources we reviewed do not describe an MCP server or an interface for AI agents. 26

  4. Wait events with no extra extension

    PostgresAI

    An ASH-style wait event dashboard built from samples of pg_stat_activity. No extra extension is needed. docs

    PgHero

    PgHero has a Live Queries page and flags queries running longer than 60 seconds by default. The sources we reviewed do not describe wait event sampling. 82

Short answer​

PgHero, by Andrew Kane, is an MIT-licensed performance dashboard for Postgres. It connects to a database and shows slow queries, suggested, duplicate and unused indexes, space, connections and vacuum status, with optional history of query and space stats. PostgresAI is a monitoring product with metric history, wait event analysis, scheduled checkups and Issues, hosted or self-hosted. Pick PgHero for a single-container dashboard that answers what is slow and which indexes to add or drop. Pick PostgresAI for continuous metrics, alerts, agent access and expert help.

When PgHero is the better choice​

  • Open source under the MIT license and free; one Docker container or a gem mounted in a Rails app.
  • Suggested indexes: it parses the most time-consuming queries from pg_stat_statements and uses pg_stats estimates to propose an index.
  • One overview page flags long running queries, connections, replication lag, vacuuming, columns near integer overflow, invalid indexes and constraints, duplicate, unused and suggested indexes, and slow queries.
  • An Explain page runs EXPLAIN, with EXPLAIN ANALYZE opt-in, and links to a plan visualizer; a Tune page lists current settings and links to PgTune.
  • System stats such as CPU and IOPS from Amazon RDS and Google Cloud SQL in the same dashboard.
The Issues list in the PostgresAI Console: unused indexes consuming 19.2 GiB, redundant indexes that can be deleted to save 3.76 GiB, an invalid index and estimated index bloat, each opened by a checkup.

What you get​

Checkup findings as Issues in the PostgresAI Console. How it works

See plans and pricingOpen the live demoTalk to us

PostgresAI and PgHero, side by side​

QuestionPostgresAIPgHero
What it isPostgreSQL monitoring with scheduled health checkups. Findings become Issues with severity, evidence and a recommended fix, which you, your AI agent or a PostgresAI expert can act on. docsdocs 2A performance dashboard for Postgres, with pages for Overview, System, Queries, Space, Connections, Live Queries, Maintenance, Explain and Tune. It connects to one or more databases by connection URL. 182
Where your Postgres can run, and which versionsYesAmazon RDS and Aurora, Google Cloud SQL, Azure Database for PostgreSQL, Supabase, Tiger Data, self-managed servers and Postgres running on Kubernetes. PostgreSQL 14 and newer, with the pg_stat_statements extension. docsYesAny server it can connect to, running Postgres 14 or newer: version 4.0 dropped support for older versions. The guides cover self-managed servers and Amazon RDS for query stats, and CPU, IOPS and other system stats from Amazon RDS and Google Cloud SQL. Version 4.0 dropped system stats for Azure Database. 426
Where it runs and what it collectsYesHosted by PostgresAI, or self-hosted in your own cloud account or on your own server. It collects database metadata such as statistics, normalized query texts and wait events, not table data or query parameters. docsdocs 2YesSelf-hosted, as a Docker image (the guide includes a Kubernetes example) or a Rails engine mounted in your app. Version 4.0 dropped Linux packages. Historical stats are stored in tables in the monitored database or another one you choose. 1236
Open sourceYesThe monitoring software is open source under Apache 2.0. Hosted plans are a separate paid service. docsdocs 2YesOpen source under the MIT license. Version 4.1.0 was released on 2026-10-20. 76
Query performance analysisYesTop queries from pg_stat_statements by calls, execution time, planning time and rows, with a drill-down dashboard for a single query. For execution plans, Joe runs EXPLAIN on a DBLab clone. docsdocs 2YesA Queries tab from pg_stat_statements, with slow-query thresholds of 20 ms average and 100 calls by default. A task you schedule every 5 minutes captures history and adds a time range slider. The Explain page runs EXPLAIN, with ANALYZE opt-in and a 10-second default timeout. 2346
Wait event analysisYesAn ASH-style wait event dashboard built from samples of pg_stat_activity. No extra extension is needed. docsNot documentedA Live Queries page lists running queries, and the overview flags long running queries (60 seconds by default). The sources we reviewed do not describe wait event sampling. 829
Health checks and recommendationsYesScheduled checkup reports on settings, autovacuum and bloat, and indexes (invalid, unused, redundant). Each finding becomes an Issue with severity, evidence and a specific fix. docsdocs 2YesThe overview checks long running queries, high connections and connections idle in transaction, replication lag, inactive replication slots, cache hit rate, vacuuming, columns near integer overflow, invalid indexes and constraints, and duplicate, unused and suggested indexes and slow queries. Suggested indexes need pg_query and query stats. 935
AI and agent accessYesThe postgresai CLI (alias pgai) and an MCP server with tools for Issues, action items and checkup reports. The setup guide covers Cursor, Claude Code, Windsurf and Codex. docsdocs 2Not documentedA /health endpoint for health checks. Version 4.0 dropped the Ruby API. The sources we reviewed do not describe an MCP server or an interface for AI agents. 26
Testing a fix before productionYesWith DBLab Engine, a separate open-source product: a full-size thin clone of the database in seconds, where an index or query change can be run on real data. DBLab is set up and priced separately. docsdocs 2Not documentedSuggested indexes are estimated from pg_stat_statements and pg_stats, and EXPLAIN runs on the database PgHero connects to. The sources we reviewed do not describe testing a change on a separate copy. 52
Human PostgreSQL expertsYesScale includes two expert requests a month, answered within 24 business hours. Either plan can buy a one-off pack of two requests for $500. Consulting is separate. docsdocs 2Not documentedNot documented in the sources we reviewed. The README invites bug reports and pull requests on GitHub. 1
AlertsEmail and Slack alerts on Starter and Scale. docsThe dashboard shows warnings, such as total connections above a threshold of 500 by default. The sources we reviewed do not describe alert notifications. 29
History kept14 days on Starter, 13 months on Scale, custom on Enterprise. docsHistory is optional and kept for as long as you choose: the guides show removing query stats older than 14 days and space stats older than 90 days. 23
Security attestationsSOC 2 Type 2 examination completed for the Security and Availability criteria, covering March 4 to June 4, 2026. The SOC 3 report is public. docsPgHero is software you run yourself. The sources we reviewed do not describe security attestations. 1

Pricing​

ProductPlanList priceNotes
PostgresAIStarter$16 per cluster/monthPrimary only, 14-day retention, no expert requests included
PostgresAIScale$512 per cluster/monthPrimary and up to 5 replicas in one cluster, 13-month retention, Grafana dashboards, 2 expert requests a month
PostgresAIEnterpriseCustomContact sales
PostgresAISelf-hostedNo licence feeOpen source under Apache 2.0; you run it yourself
PgHeroOpen sourceFreeMIT license; you run the Docker image or Rails engine 71

List prices on 18 Nov 2026. The billing units differ, so this is not a total-cost comparison. PostgresAI pricing

Using PostgresAI with PgHero​

Both read pg_stat_statements and can point at the same database. DBLab, a separate product, copies any PostgreSQL source, so an index PgHero suggests can be created on a full-size DBLab clone and the query timed there before production.

Questions​

Is PgHero open source?
Yes. PgHero is open source under the MIT license, maintained by Andrew Kane, and runs as a Docker image or a Rails engine. 71
Does PgHero work with Amazon RDS?
Yes. The query stats guide covers enabling pg_stat_statements on Amazon RDS through a parameter group, and PgHero can show CPU, IOPS and other system stats from RDS through CloudWatch. 42
Does PgHero keep history?
Optionally. You create tables for query and space stats and schedule capture tasks, every 5 minutes for queries and daily for space. A cleanup task removes old rows; the guides use 14 and 90 days as examples. 23
Can I use PostgresAI and PgHero together?
Yes. They read the same statistics and can watch the same database. DBLab, the PostgresAI cloning product, copies any PostgreSQL source, so an index PgHero suggests can be tested on a full-size clone before production.

Check it on your own database​

The express checkup works with PostgreSQL 14 or newer. With --no-upload it needs no account and sends no report data to PostgresAI. It needs Node.js 18 or newer and a database role with pg_monitor. Compare what it finds with what your current tool shows for the same database.

See plans and pricingOpen the live demoTalk to us

Sources​

  1. PgHero repository README
  2. PgHero Docker guide
  3. PgHero Rails guide
  4. PgHero query stats guide
  5. How PgHero suggests indexes
  6. PgHero changelog
  7. PgHero license
  8. PgHero source: dashboard navigation
  9. PgHero source: overview page

These pages compare what each product does for PostgreSQL; other databases and the rest of the stack are out of scope. What we say about the other product comes from its own documentation, pricing page, changelog or source repository, read on the date shown; each row cites its source. "Not documented" means we did not find it in those sources, not that the product cannot do it. Prices are list prices and the billing units differ, so they are not a total-cost comparison. Product names are trademarks of their owners. Found a mistake? Tell us and we will correct the page.