next up previous
Next: Merge-Join Up: Join Strategies Previous: Simple Iteration

Block-Oriented Iteration

  1. If we process tuples on a per-block basis we can save many accesses.

    The idea is that, if both relations have tuples stored together physically, we can examine all the tuple pairs for a block of each relation at one time. We still need to read all the tuples of one relation for a block of the other relation.

    The block method algorithm is:

     afor each block Bd of deposit do
    

    begin

    for each block Bc of customer do

    begin

    for each tuple d in Bd do

    begin

    for each tuple c in Bc do

    begin

    test pair (d, c) to see if a tuple

    should be added to the result

    end

    end

    end

    end



Osmar Zaiane
Sun Jul 26 17:45:14 PDT 1998