Troubleshooting slow PostgreSQL queries
The usual reasons a database becomes slow, from a missing index to too many connections to table bloat, and how to work out which one is affecting you.
What this covers
Database slowness usually has one of four causes. A query has no index and is reading the whole table, which shows up as one query being slow while everything else is fine. Too many connections are open, which shows up as everything being slow at once and new connections being refused. The table has bloated after heavy deletes, so scans read empty space. Or the database has simply outgrown its memory, and data that used to be cached is now read from disk on every query. PostgreSQL can tell you which it is: its own statistics views list the slowest statements, and the query planner will show you whether an index was used.
A performance troubleshooting guide with the specific queries to run is not published in the Voroa docs today.