[prev] 38 [next]

Exercise 5: Grace Hash Join Cost

Consider executing Join[i=j](R,S) with the following parameters:
  • rR = 1000bR = 50rS = 3000bS = 150,  cRes = 30
  • R.i  is primary key, each R tuple joins with 2 S tuples
  • DBMS has N = 43 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