For each partition HRi Read HRi into RAM and build a hash index. We want small intermediate results but sometimes the choice of a join algorithm is more important as the following example will illustrate. So, if we based our decision solely on the size of intermediate results we could chose to join ABE and BC first.
Lets calculate the cost in block accesses of each starategy.
The total cost of the two joins should include the write accesses for the intermediate result which is 3,000. The total cost of the two joins should include the write accesses for the intermediate result which is 10,000. Early Do the joins with the smallest intermediate results first.