Question: Consider the join ( R bowtie S ) where the join predicate is ( R . a = S . b
Consider the join R bowtie S where the join predicate is R aS b given the following metadata about R and S :
Relation R contains tuples and has tuples per page block
Relation S contains tuples and has tuples per page block
Attribute b of relation S is the primary key for S and every tuple in S matches tuples in R
There exists an unclustered Btree index on Ra with height
There exists a clustered Btree index on S b with height
Main memory holds blocks
Answer the following questions:
If R bowtie 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 IOs
If R bowtie S is evaluated with an index nested loop join, what will be the cost of the join in number of IOs Which index you will use? Show your cost analysis.
What is the cost of a plan that evaluates this query using sortmerge join. Show the details of your cost analysis.
Evaluate the cost of computing R bowtie S using hash join assuming: i The main memory buffer can hold blocks, ii The main memory buffer can hold blocks.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
