Question: Assume a relation prod ( pid , category, price, . . . ) with 6 0 0 , 0 0 0 tuples, where each tuple

Assume a relation prod(pid, category, price, ...) with 600,000 tuples, where
each tuple is 100 bytes. The product ID pid is a key and is equally distributed
between 1 and 3,000,000. The block size is 2,000 bytes.
Consider a B+-tree index on the product ID pid, where the pid requires 4
bytes and a pointer requires 6 bytes; a tree node occupies an entire block.
The minimal and maximal number of blocks used for the tree are
and respectively.
Consider the B+-tree from a) with the minimal number of blocks and as-
sume that it is a primary index. The following two queries are run:
Q1: SELECT * FROM prod WHERE pid BETWEEN 10000 AND 20000
Q2: SELECT CNT(*) FROM prod WHERE pid BETWEEN 10000 AND
20000
The number of IOs (data blocks + index blocks) are and respectively.
Repeat the query Q1 in part b with B+-tree index as a secondary index.
The number of IOs (data blocks + index blocks) are
 Assume a relation prod(pid, category, price, ...) with 600,000 tuples, where

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