Consider the join R ▷◁ S where the join predicate is R.a = S.b, given the following metadata about R and S: Relation R contains 2,000 tuples and has 10 tuples per block Relation S contains 10,000...


Consider the join R ▷◁ S where the join predicate is R.a = S.b, given the following metadata about R and S:



  • Relation R contains 2,000 tuples and has 10 tuples per block

  • Relation S contains 10,000 tuples and has 10 tuples per block

  • Attribute a of relation R is the primary key for R, and every tuple in R matches 5 tuples in S

  • There exists a primary index on S.b with height 3

  • There exists a secondary index on R.a with height 2

  • The buffer can hold 5 blocks

  • For this problem, we use a simplified cost model where cost = number of I/O in terms of pages (i.e., the number of pages read/written).  If R ▷◁R.a=S.b S is evaluated with a block nested loop join, which relation should be the outer relation? Justify your answer. What is the cost of the join in number of I/O’s?



Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here