talira

A performance dashboard for Postgres

open sourceMITself-hostablefree

PgHero is a performance dashboard for PostgreSQL that runs as a Docker 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 and Google Cloud SQL. Andrew Kane (ankane) wrote it, and the README says it's battle-tested at Instacart.

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
View 2 more
  • multiple databases and custom thresholds in config/pghero.yml
  • basic authentication, or Devise when mounted in Rails

Capabilities

Has an APIplan not known

Alternatives

The same job

These do what PgHero does.

  1. Postgres MCP Pro A Postgres MCP server with index tuning, explain plans, health checks, and safe SQL execution

Compare PgHero with the top 3