Get insights of your PostgreSQL database with PgHero

PgHero is a ruby gem that gives you insights of your PostgreSQL database.

Out of the box it provides info about stuff like cache hit rate, which queries are too slow, which tables need indexes, and more. Here's how it looks on a production app:


(Yeah, I have to add an index there I know :P)

To add it to your app: add this line to your  Gemfile:
gem 'pghero'
And add this to config/routes.rb to mount the dashboard:
mount PgHero::Engine, at: "pghero"

You'll also want to secure the access to the dashboard if you mount it as part of your public-facing app; we didn't have to as it is in our admin section.

There's also the option to check the insights programmatically, run it via SQL without the web interface, run it as a standalone app, get system stats like CPU usage… check their readme for the good stuff.

Happy optimizing!

3 comments:

  1. I constantly emailed this site post page to all my friends, because if prefer to read it then my all friends will too.
    Search Engine Optimization

    ReplyDelete
  2. A couple of years back I wrote an article on optimizing meta descriptions to help increase your website traffic. Check it out.
    xenforo amp

    ReplyDelete
  3. Your blogs are easily accessible and quite enlightening so keep doing the amazing work guys.
    Men Sex Toys

    ReplyDelete