CS FundamentalsHardGATE CS · Product placement

A B+ tree index uses 8192-byte blocks, 24-byte search keys, 10-byte block pointers and 16-byte record (data) pointers. Each leaf also keeps one block pointer to the next leaf. What is the maximum number of keys a LEAF node can hold?

  1. A. 203
  2. B. 241
  3. C. 204
  4. D. 240

Correct answer: C. 204

A leaf holds q (key, record-pointer) pairs plus one next-leaf pointer: 40·q + 10 ≤ 8192 gives q = ⌊(8192 − 10)/40⌋ = 204. Using the block-pointer size or forgetting the sibling pointer gives the traps.

More DBMS and SQL questions

Exams that ask this topic