CS FundamentalsVery hardGATE CS (PYQ pattern)

A B+ tree on 8-byte keys uses 4096-byte blocks. An internal node holds p tree pointers (8 bytes each) and p − 1 keys. A leaf holds q (key, 8-byte record pointer) pairs plus one 8-byte next-leaf pointer. Each node fills exactly one block as fully as possible. The maximum number of records indexed by a tree with three levels (root, one internal level, leaves) is:

  1. A. 16,777,216
  2. B. 16,711,680
  3. C. 16,581,375
  4. D. 16,646,400

Correct answer: B. 16,711,680

For internal nodes 8p + 8(p − 1) ≤ 4096 gives p = 256. For leaves 16q + 8 ≤ 4096 gives q = 255. Records = 256 × 256 × 255 = 16,711,680; 256³ ignores the leaf's next pointer.

More DBMS and SQL questions

Exams that ask this topic