CS157b
Chris Pollett
Mar 4, 2024
How much more efficient is this last idea than just merging two sorted lists at time?
Which of the following is true?
Recall `M =` number of memory blocks; `B(T)` = number of blocks in table `T`.
For each s in S do For each r in R do if r and s join make a tuple t then output t;
For each M-1 blocks of S do begin Read these blocks into main-memory buffers; Organize their tuples into a structure whose search attributes are the common attributes of R and S; For each block b of R do begin For each tuple t of b do begin find the tuples of S in main memory that join with t; output the join of t with each of these tuples; end; end; end;
Given `R` we sort `R` and output distinct values.