Hash join
Join algorithm: build a hash table of the smaller relation (build phase), iterate the larger relation and look up (probe phase). O(N+M) — fastest for equi-joins on medium-large data without indexes.
Requires memory for the hash table. If the build relation > work_mem (PostgreSQL) → spills to disk (hash spill, multi-pass). Preferred plan for analytical workloads (data warehouse). Adaptive hash join: start in-memory, switch to disk on RAM pressure. Competitors: nested loop (good on small + indexed), merge join (good if both sorted). The PostgreSQL planner picks based on estimated cost. Hash joins don't work for non-equi predicates (range, fuzzy match).