Exercise 3: One vs Multiple Indices
Consider a relation with r = 100,000, B = 4K, defined as:
create table Students (
id integer primary key,
name char(10),
gender char(1)
birthday date
);
select * from Students
where gender='m' and birthday='YYYY-02-29'
|
which has a B-tree index on each attribute ...
- describe the selectivity of each attribute
- estimate the cost of answering using one index
- estimate the cost of answering using both indices
|