[prev] 55 [next]

Exercise 9: Sort-merge Join Cost

Consider executing Join[i=j](S,T) with the following parameters:
  • rS = 1000bS = 50rT = 3000bT = 150
  • S.i is primary key, and T has index on T.j
  • T is sorted on T.j, each S tuple joins with 2 T tuples
  • DBMS has N = 42 buffers available for the join
Calculate the cost for evaluating the above join
  • using sort-merge join
  • compute #pages read/written
  • compute #join-condition checks performed