Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Suppose we have a B+tree index available for attribute a of R. The height of the B+ tree is 3. Assume each node of the

Suppose we have a B+tree index available for attribute "a" of R. The height of the B+ tree is 3. Assume each node of the B+ tree index occupies one page. Assume the cost is measured by disk I/Os for accessing the index and the records. 

We run the following query on relation R: 

SELECT * FROM R WHERE a = 1000 a)

 

Estimate the average cost of executing the above query when the B+tree index is clustered, i.e., the records with the same a value are stored consecutively in the disk but may spread in different blocks. (Assume the B+tree has 67% occupancy, i.e., the physical data pages are 1.5 times more than original data file.)

 

Estimate the cost of executing the above query when the index is unclustered. (Assume the size of a data entry in the B+tree is around 20% of the data record (the data entry also includes the RID)). 

Step by Step Solution

3.52 Rating (159 Votes )

There are 3 Steps involved in it

Step: 1

To estimate the average cost of executing the query for both clustered and unclustered scenarios we ... 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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant Navathe

7th Edition

0133970779, 978-0133970777

More Books

Students also viewed these Databases questions

Question

What kind of rays are X-rays?

Answered: 1 week ago