CS FundamentalsHardGATE CS · PSU (ISRO/BARC)

Relations R (400 blocks) and S (100 blocks) are joined with block nested-loop join using M = 12 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. 4400
  2. B. 40100
  3. C. 3700
  4. D. 4100

Correct answer: D. 4100

With the smaller relation (100 blocks) outer: 100 + ⌈100/10⌉·400 = 4100. Making the larger relation outer costs 4400.

More DBMS and SQL questions

Exams that ask this topic