O'Reilly logo

Learning Heroku Postgres by Patrick Espake

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Common errors

There are a number of common errors that can be easily identified through the logs. Understanding these errors and analyzing can help you in the process of continuous database improvement.

Then you will understand the most common ones so that you can take the necessary action in order to solve them.

LOG: long duration

Queries that take longer than 2 seconds are logged automatically so that you can identify and optimize your code. These logs are generated in the following format:

[8-2] g0afa5bjht [GOLD] LOG: duration: 63.697 ms statement: SELECT "courses".* FROM "courses"...

If there are large numbers of these logs, probably your application has performance problems. A good recommendation is to try to reduce the execution time of your ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required