CS FundamentalsVery hardGATE CS · PSU (ISRO/BARC)

A relation has 100,000 tuples and a selection σ_{city='Pune'} with an estimated selectivity of 2%. Each block holds 50 tuples and the relation is clustered (sorted) on city. Using a clustering B+ tree index of height 3 (excluding the data level), about how many block accesses are needed?

  1. A. 5 (3 + 2 data blocks)
  2. B. 2,000 (full scan)
  3. C. 2,003 (3 + one per matching tuple)
  4. D. 43 (3 index + 40 data blocks)

Correct answer: D. 43 (3 index + 40 data blocks)

2% of 100,000 = 2,000 matching tuples, stored contiguously in 2,000/50 = 40 blocks. Traversing the index costs 3, so about 43. A non-clustering index could need one block per tuple.

More DBMS and SQL questions

Exams that ask this topic