This post continues the study of ‘Access Path Selection in a Relational Database Management System’ (Selinger et al., 1979), now covering chapter 5 and how the optimizer handles joins. PostgreSQL uses hash join most often, which the 1979 paper doesn’t describe.