Hash Joins in Postgres: When to Pick Them, When the Planner Picks Them For You
Hash joins are the workhorse for large equi-joins. They are also the join type that quietly spills to disk when work_mem is too small, turning a fast query into a slow one.