Question: onsider the join R { R . a = S . b } S , given the following information about R and S . The

onsider the join R {R.a = S.b} S, given the following information about R and S. The cost metric is the number of page I/Os, and the cost of writing out the final result is ignored.
R contains 200,000 tuples and has 20 tuple per page.
S contains 4,000,000 tuples and also has 20 tuples per page.
R.a is the primary key for R.
Each tuple of R joins with exactly 20 tuples of S.
1,002 pages available in the buffer pool.
What is the cost of the join using a page-oriented nested loop joins (that is, to use one page to load outer relation in each iteration)?
What is the cost of the join using a block nested loop joins?
What is the cost of the join using a sort-merge join?
What is the minimum number of buffer pages required for the sort-merge join? Suppose we use heap sort to increase initial run size in the sort phase.
What is the cost of the join using a hash join?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!