Algorithms, Database, Distributed Systems, Join, Data Processing.
advantage of the sort-merge join is that each relation, if sorted, is scanned only once, thus we have (M + N) tuple accesses on disk compared to (M ∙ N) for the nested-loop join. Furthermore, the number of unnecessary comparisons is relatively low in any situation. Sort Cost (R): 2M ∙ (1 + ⌈ logB-1