Heroku Postgres offers, through its dashboard, a graphical interface for analyzing the performance of your database.
It displays the queries through four criteria:
Most time consuming
Slowest execution time
Highest throughput
Slowest I/O
To view this information, visit https://postgres.heroku.com, select your database, and then go to the Expensive queries section.