Slideshow:
|
|
|
while ( S ≠ empty ) { Read M - 1 blocks of S: organize these tuples into a search structure (e.g., hash table)' Rewind R; while ( R ≠ empty ) { Read 1 block (b) of R; for ( each tuple t ∈ block b ) do { Find the tuples s1, s2, ... of S (in the search structure) that join with t Output (t,s1), (t,s2), ... } } } |
Graphically:
|
(1) The algorithm will read S once: # disk I/Os = B(S) (2) # fragments Si read: B(S)/(M−1) times For each fragment Si, algorithm read R once # disk I/Os = B(S)/(M−1) × B(R) |
|
(Presented previously !!!)
(1) The algorithm will read S once: # disk I/Os = B(S) (2) # fragments Si read: B(S)/(M−1) times For each fragment Si, algorithm read R once # disk I/Os = B(S)/(M−1) × B(R) |
(Presented previously !!!)
(1) The algorithm will read R once: # disk I/Os = B(R) (2) # fragments Ri read: B(R)/(M−1) times For each fragment Ri, algorithm read S once # disk I/Os = B(R)/(M−1) × B(S) |