CS FundamentalsHardGATE CS

Relations R (800 blocks) and S (300 blocks) are joined by block nested-loop join with 52 buffer blocks (one for output, one for the inner relation, the rest for the outer). What is the minimum number of block transfers, ignoring the output?

  1. A. 5,100
  2. B. 5,600
  3. C. 3,300
  4. D. 4,300

Correct answer: A. 5,100

With S outer: 300 + ⌈300 / 50⌉ × 800 = 300 + 6 × 800 = 5,100. With R outer: 800 + ⌈800 / 50⌉ × 300 = 5,600. The smaller relation should be the outer one.

More DBMS and SQL questions

Exams that ask this topic