CS157b
Chris Pollett
Mar 2, 2020
Which of the following statements is true?
Ex 4 2 5 1 6 3 (runs length 1) 2 4 1 5 3 6 (runs length 2) 1 2 4 5 3 6 (runs length 4) 1 2 3 4 5 6 (runs of length 8) -- done
How much more efficient is this last idea than just merging two blocks?
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.