|< < 35 > >|

Joins

Block Nested Loops Join

We're on the right track: Use memory to buffer outer loop rows, thereby reducing the number of times we run the inner loop.

  • Suppose we have room for B pages in the disk buffer.

  • We've just tried B = 3:
    • One for a page of R.
    • One for a page of S.
    • One for a page of join output.

|< < 35 > >|