Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

PgHero: Easy Insights Into Your PostgreSQL Database

DZone's Guide to

PgHero: Easy Insights Into Your PostgreSQL Database

· Java Zone ·
Free Resource

The CMS developers love. Open Source, API-first and Enterprise-grade. Try BloomReach CMS for free.

If you're working with PostgreSQL and want to get a better a sense of what's going on under the hood in your database, here's something cool: PgHero, created by Andrew Kane on GitHub, offers a variety of insights into running queries, used and unused resources, and things like that. The GitHub page lists the following commands:

PgHero.running_queries
PgHero.long_running_queries
PgHero.index_usage
PgHero.missing_indexes
PgHero.unused_indexes
PgHero.unused_tables
PgHero.database_size
PgHero.relation_sizes
PgHero.index_hit_rate
PgHero.table_hit_rate

# kill queries
PgHero.kill(pid)
PgHero.kill_all

And the end result is something like this:

(Source: PgHero on GitHub)

You'll need PostgreSQL 9.2 or better to run PgHero, and it's definitely still a work in progress - there's a TODO section on the GitHub page, after all - but still worth checking out.


BloomReach CMS: the API-first CMS of the future. Open-source & enterprise-grade. - As a Java developer, you will feel at home using Maven builds and your favorite IDE (e.g. Eclipse or IntelliJ) and continuous integration server (e.g. Jenkins). Manage your Java objects using Spring Framework, write your templates in JSP or Freemarker. Try for free.

Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}