Question: It seems that more memory is required to do sort-merge join in 3(R+S) than to do hash join in 3(R+S) Why is this true? Could
It seems that more memory is required to do sort-merge join in 3(R+S) than to do hash join in 3(R+S)
Why is this true? Could someone please explain (Maybe with examples)

Cost of Hash-Join * Partition phase: read+write both relns; 2(IR+IS|). Join phase: read both reins; R H s i (assuming Ri or Si fits in memory) Sort-Merge Join vs. Hash Join: - Condition for 3(|RI +S|): sqrt(min 1 R 1 , I s i }) for Hash join (slide 42) B sqrt(max( IRI,ISI) for Sort-merge join (slide 33) Hash Join is parallelizable but sensitive to data skew. Sort-Merge's result is sorted on the join column. Cost of Hash-Join * Partition phase: read+write both relns; 2(IR+IS|). Join phase: read both reins; R H s i (assuming Ri or Si fits in memory) Sort-Merge Join vs. Hash Join: - Condition for 3(|RI +S|): sqrt(min 1 R 1 , I s i }) for Hash join (slide 42) B sqrt(max( IRI,ISI) for Sort-merge join (slide 33) Hash Join is parallelizable but sensitive to data skew. Sort-Merge's result is sorted on the join column
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
