CS FundamentalsHardGATE CS · DBMS

Relations R (1000 blocks) and S (500 blocks) are joined with block nested-loop join using M = 22 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. 500500
  2. B. 25500
  3. C. 26000
  4. D. 23500

Correct answer: B. 25500

With the smaller relation (500 blocks) outer: 500 + ⌈500/20⌉·1000 = 25500. Making the larger relation outer costs 26000.

More DBMS and SQL questions

Exams that ask this topic