Exercise 2: Grace Hash Join Cost
Consider executing Join[i=j](R,S) with the following parameters:
- rR = 1000, bR = 50,
rS = 3000, bS = 150, cRes = 30
- R.i is primary key, each R tuple joins with 2 S tuples
- DBMS has N = 42 buffers available for the join
- data + hash have reasonably uniform distribution
Calculate the cost for evaluating the above join
- using Grace hash join
- compute #pages read/written
- compute #join-condition checks performed
- assume that no R partition is larger than 40 pages
|