CS FundamentalsHardGATE CS · PSU (ISRO/BARC)

Relations R (600 blocks) and S (90 blocks) are joined with block nested-loop join using M = 32 buffer blocks (M − 2 for the outer relation, one for the inner, one for output). What is the minimum number of block transfers, choosing the better outer relation?

  1. A. 54090
  2. B. 2400
  3. C. 54000
  4. D. 1890

Correct answer: D. 1890

With the smaller relation (90 blocks) outer: 90 + ⌈90/30⌉·600 = 1890. Making the larger relation outer costs 2400.

More DBMS and SQL questions

Exams that ask this topic