[prev] 21 [next]

Exercise 4: Hybrid 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 = 42 buffers available for the join
  • data + hash have reasonably uniform distribution
Calculate the cost for evaluating the above join
  • using hybrid hash join with m=1, p=40
  • compute #pages read/written
  • compute #join-condition checks performed
  • assume that no R partition is larger than 40 pages