[prev] 46 [next]

Exercise 2: One vs Multiple Indices

Consider a relation with r = 100,000, B = 4096, defined as:

create table Students (
    id       integer primary key,
    name     char(10), -- simplified
    gender   char(1),  -- 'm','f','?'
    birthday char(5)   -- 'MM-DD'
);

Assumptions:

  • data file is not ordered on any attribute
  • has a dense B-tree index on each attribute
  • 96 bytes of header in each data/index page