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
R is clustered S is clustered
No index on R
Clustering sorted index on S
V(S,Y) = 100
|
|
Cost of this Join algorithm:
(1) Sort R into chunks and save sorted chunks on disk: 2 × B(R) blocks |
Total cost = 3 B(R) + B(S)
= 3 × 1000 + 500 // In example
= 3500 blocks
(We beat TPMMS based join which has cost: 3B(R) + 3B(S) = 4500 block disk IOs)
|
Note:
|