Slideshow:
relation R(X,Y) relation S(Y,Z)
--------------------------------------------
B(R) = 1000 blks B(S) = 500 blocks
T(R) = 10000 tuples T(S) = 5000 tuples
V(S,Y) = 100
|
|
Cost of (= # disk IO used) the Index Join algorithm:
B(S)
# disk IO = B(R) + T(R) × -------
V(S,Y)
500
= 1000 + 10000 × ------
100
= 51,000 blocks
|
Cost of (= # disk IO used) the one-pass join algorithm :
# disk IO = B(R) + B(S) (See: click here) = 1000 + 500 = 1500 blocks |
|
|
relation R(X,Y) relation S(Y,Z)
--------------------------------------------
B(R) = 1 blks B(S) = 500 blocks
T(R) = 10 tuples T(S) = 5000 tuples
V(S,Y) = 100
|
|
# disk IO used by the index Join algorithm:
B(S)
# disk IO = B(R) + T(R) × -------
V(S,Y)
500
= 1 + 10 × -----
100
= 51 blocks
|
# disk IO used by the one-pass join algorithm based on TPMMS
# disk IO = B(R) + B(S) (See: click here) = 1 + 500 = 501 blocks |
|
|