# PgHero

> A performance dashboard for Postgres

Source: https://talira.ai/catalog/pghero-jt9sfs5t
Every listing: https://talira.ai/catalog.md

- Kind: Open source
- Types: Web app, Library
- Categories: [databases / postgres / monitoring](https://talira.ai/categories/databases/postgres/monitoring), [languages / ruby / rails](https://talira.ai/categories/languages/ruby/rails)
- Platforms: docker, web[^3][^4]
- Licence: MIT[^1]
- Pricing: Free and open source[^1]
- Free tier: yes[^1]
- Self-hostable: yes[^2]
- API: yes[^2]
- Creator: Andrew Kane (ankane)

PgHero is a performance dashboard for [PostgreSQL](https://talira.ai/catalog/postgresql-cm55wcnd.md) that runs as a [Docker](https://talira.ai/catalog/docker-engine-9442r3nw.md) image or mounts as a Rails engine in an existing app. Its overview flags slow and long-running queries, unused, duplicate and invalid indexes, high connection counts, connections idle in transaction, replication lag and a low cache hit rate; other tabs show query stats from pg_stat_statements, table and index sizes, live queries you can kill, last vacuum and analyze times, `EXPLAIN` output and the server's settings. It can suggest indexes by parsing the slowest queries with pg_query, keep query and space stats over time, and show CPU and IOPS for [Amazon RDS](https://talira.ai/catalog/amazon-rds-my1p654h.md) and Google Cloud SQL. Andrew Kane (ankane) wrote it, and the README says it's battle-tested at Instacart.

## Links

- GitHub: https://github.com/ankane/pghero

## Problems it solves

- find which queries are making my Postgres database slow
- see whether my Postgres tables have indexes that are never used
- tell me which index to add to speed up a slow query
- a database health dashboard for our Rails app without paying for a monitoring SaaS
- find duplicate indexes wasting disk space in Postgres
- which tables and indexes are taking up all the space in my database
- spot queries that have been running for minutes and kill them from a web page
- too many connections are sitting idle in transaction and I want to see them
- check replication lag and inactive replication slots that fill the disk
- track query timings over time to see what got slower after a deploy
- run EXPLAIN on a query from the browser instead of opening psql
- see CPU and IOPS for our RDS database next to its slowest queries
- check when autovacuum last ran and how many dead rows each table has
- give the team a self-hosted Postgres monitoring page they can open in a browser

## Features

- overview checks for slow and long-running queries, connections, cache hit rate and replication
- unused, duplicate and invalid index detection
- query stats from pg_stat_statements, with history over time
- index suggestions from the slowest queries (pg_query)
- table and index sizes, with history over time
- live queries, with a button to kill one
- last vacuum, last analyze and dead rows per table
- EXPLAIN from the dashboard
- server settings on the Tune tab
- CPU, IOPS and other system stats for Amazon RDS and Google Cloud SQL
- multiple databases and custom thresholds in config/pghero.yml
- basic authentication, or Devise when mounted in Rails

## Capabilities

- Has an API: plan not known

## Trust

Overall: 0.36 out of 1.
Signals: backing 0.40, extensibility 0.20.

- created by Andrew Kane (ankane)
- used by Instacart

Warnings:

- GitHub activity not fetched yet

## Related

- Works with [PostgreSQL](https://talira.ai/catalog/postgresql-cm55wcnd.md)

## Alternatives

- [Postgres MCP Pro](https://talira.ai/catalog/postgres-mcp-pro-j2wvmkav.md): A Postgres MCP server with index tuning, explain plans, health checks, and safe SQL execution

## Sources

[^1]: https://github.com/ankane/pghero/blob/master/LICENSE.txt (checked 20 Nov 2026)
[^2]: https://github.com/ankane/pghero/blob/master/guides/Rails.md (checked 20 Nov 2026)
[^3]: https://github.com/ankane/pghero (checked 20 Nov 2026)
[^4]: https://github.com/ankane/pghero/blob/master/guides/Docker.md (checked 20 Nov 2026)
