Question: Assume a relation prod ( pid , category, price, . . . ) with 6 0 0 , 0 0 0 tuples, where each tuple
Assume a relation prodpid category, price, with tuples, where
each tuple is bytes. The product ID pid is a key and is equally distributed
between and The block size is bytes.
Consider a tree index on the product ID pid, where the pid requires
bytes and a pointer requires bytes; a tree node occupies an entire block.
The minimal and maximal number of blocks used for the tree are
and respectively.
Consider the tree from a with the minimal number of blocks and as
sume that it is a primary index. The following two queries are run:
Q: SELECT FROM prod WHERE pid BETWEEN AND
Q: SELECT CNT FROM prod WHERE pid BETWEEN AND
The number of IOs data blocks index blocks are and respectively.
Repeat the query Q in part with tree index as a secondary index.
The number of IOs data blocks index blocks are
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
