CS FundamentalsVery hardGATE CS (PYQ pattern) · Product Company SDE

A B-tree node must fit in a 4096-byte block; each key takes 16 bytes and each child pointer 6 bytes. What is the maximum order p (maximum number of child pointers) of the node?

  1. A. 186
  2. B. 185
  3. C. 187
  4. D. 223

Correct answer: A. 186

p·P + (p−1)·K ≤ B → p ≤ (B+K)/(P+K) = (4096+16)/22 = 186.91 → 186. Ignoring that keys are one fewer than pointers gives 186.

More DBMS and SQL questions

Exams that ask this topic