How PostgreSQL Indexes Actually Work

Every "why is this query slow" investigation ends in the same place: a query is reading far more rows than it returns, because it has no index to jump straight to the ones it needs.