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.
Where PostgresAI is ahead of PgHero
Each point pairs what our documentation says with what the PgHero documentation says. Follow the links and check.
Test the fix on a full-size copy first
13 months of history
PostgresAIScale keeps 13 months of history. docs
An AI agent can work through the findings
Wait events with no extra extension
PostgresAIAn ASH-style wait event dashboard built from samples of pg_stat_activity. No extra extension is needed. docs
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.

What you get
Checkup findings as Issues in the PostgresAI Console. How it works
PostgresAI and PgHero, side by side
| Question | PostgresAI | PgHero |
|---|---|---|
| What it is | PostgreSQL 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 2 | A 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 versions | YesAmazon 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. docs | YesAny 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 collects | YesHosted 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 2 | YesSelf-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 source | YesThe monitoring software is open source under Apache 2.0. Hosted plans are a separate paid service. docsdocs 2 | YesOpen source under the MIT license. Version 4.1.0 was released on 2026-10-20. 76 |
| Query performance analysis | YesTop 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 2 | YesA 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 analysis | YesAn ASH-style wait event dashboard built from samples of pg_stat_activity. No extra extension is needed. docs | Not 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 recommendations | YesScheduled 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 2 | YesThe 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 access | YesThe 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 2 | Not 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 production | YesWith 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 2 | Not 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 experts | YesScale 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 2 | Not documentedNot documented in the sources we reviewed. The README invites bug reports and pull requests on GitHub. 1 |
| Alerts | Email and Slack alerts on Starter and Scale. docs | The 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 kept | 14 days on Starter, 13 months on Scale, custom on Enterprise. docs | History 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 attestations | SOC 2 Type 2 examination completed for the Security and Availability criteria, covering March 4 to June 4, 2026. The SOC 3 report is public. docs | PgHero is software you run yourself. The sources we reviewed do not describe security attestations. 1 |
Pricing
| Product | Plan | List price | Notes |
|---|---|---|---|
| PostgresAI | Starter | $16 per cluster/month | Primary only, 14-day retention, no expert requests included |
| PostgresAI | Scale | $512 per cluster/month | Primary and up to 5 replicas in one cluster, 13-month retention, Grafana dashboards, 2 expert requests a month |
| PostgresAI | Enterprise | Custom | Contact sales |
| PostgresAI | Self-hosted | No licence fee | Open source under Apache 2.0; you run it yourself |
| PgHero | Open source | Free | MIT 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.
Sources
- PgHero repository README
- PgHero Docker guide
- PgHero Rails guide
- PgHero query stats guide
- How PgHero suggests indexes
- PgHero changelog
- PgHero license
- PgHero source: dashboard navigation
- 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.
More comparisons
- Percona PMMwait events and clone tests vs QAN and Advisors
- pgBadgercontinuous monitoring vs log file reports
- pgMonitorfindings with fixes vs a Prometheus bundle
- pgwatchcheckups and Issues vs a metrics collector
- postgres_exporter and GrafanaIssues vs your own rules
- PoWAmanaged Postgres too vs extensions on each server
- temBoardmanaged Postgres too vs an agent on each host
- Amazon DevOps Guru for RDSany cloud vs ML on RDS (closing)
- All comparisons