Question: 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

1 Expert Approved Answer
Step: 1 Unlock

To estimate the average cost of executing the query for both clustered and unclustered scenarios we ... View full answer

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 Databases Questions!