PostgreSQL Slowdown Survival Guide

A list of techniques for diagnosing and fixing a slowdown caused by PostgreSQL. Some hallmarks for when these techniques could be useful are as follows:

The database CPU is maxing out: this could be an indication that database is overloaded, either by lots of requests, or a few unoptimised queries. Finding any slow running queries may be a good first step.
…