Sort-Merge Join
First sort data based on join attributes
- Use an external sort (as previously described), unless data is already ordered
Merge and join the files, reading sequentially a block at a time
- Maintain two file pointers; advance pointer that’s pointing at guaranteed non-matches
Allows joins based on inequalities (non-equijoins)
Very efficient for presorted data
Not pipelined unless data is presorted