This blog post is adapted from a lightning talk by Ben Fritsch at Ruby on Ice 2019.
There can be a number of reasons why your application performs poorly, but perhaps none are as challenging as issues stemming from your database. If your database's response times tend to be high, it can cause a strain on your network and your users’ patience. The usual culprit for a slow database is an inefficient query being executed somewhere in your application logic. Usually, you can implement a fix in a number of common ways, by:
- reducing the amount of open locks (or more detail about database lock debugging in this other blog post by Heroku Engineer Richard Schneeman, The Curious Case of the...