Database performance is critical to have a highly responsive web application. Heroku gives us a handful of tools to analyze our Postgres database for performance issues. Knowledge is power, and having visibility into emerging issues can help us fix them before they turn into major problems. In this recipe, you will learn about your cache hit rate, slow queries, and unused indexes.
In this recipe, we will be making use of the pg-extras
plugin for Heroku. It gives us access to additional commands to administer our Postgres database.
To install it, you need to open a terminal and run the following command:
$ heroku plugins:install git://github.com/heroku/heroku-pg-extras.git