Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider the join R join S on R.a=S.b, given the following information about the relations to be joined. The cost metric is the number of

Consider the join R join S on R.a=S.b, given the following information about the relations to be joined.

The cost metric is the number of page I/Os unless otherwise noted, and the cost of writing out the result should be uniformly ignored.

If there is an index available, then assume that it takes 3 I/Os to access a leaf page in R, and 4 I/Os to access a leaf page in S. Assume tuples are uniformly distributed.

Relation R contains 200,000 tuples and has 20 tuples per page.

Relation S contains 4,000,000 tuples and also has 20 tuples per page.

Attributes of a relation R is the primary key for R.

Each tuple of R joins with exactly 20 tuples of S.

1,002 buffer pages are available.

Q1.With 1,002 buffer pages, if un-clustered B+ indexes existed on R.a and S.b, would either provide a cheaper alternative for performing the join (using an index nested loops join) than a block nested loops join?

Q2.Would your answer in G1change if the B+ tree indexes on R.a and S.b are clustered? Explain.

Q3.Would your answer in G1change if S contained only 400,000 tuples instead of 4,000,000? Explain.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions