pg-extras is a heroku plugin for getting additional insight into your Heroku Postgres database. Even if not on Heroku there's a wealth of powerful queries within the plugin which can give you better visibility into your database.