CS FundamentalsHardGATE CS · Product placement

R has 500 tuples in 50 blocks and S has 4000 tuples in 200 blocks. With only enough memory for one block of each relation, how many block transfers does the TUPLE-at-a-time nested-loop join with R as outer need, and how many does the block nested-loop join with R as outer need?

  1. A. 200,200 and 10,200
  2. B. 100,050 and 10,050
  3. C. 2,000,050 and 10,050
  4. D. 100,050 and 100,000

Correct answer: B. 100,050 and 10,050

Tuple NL reads S once per R tuple: 500·200 + 50. Block NL reads S once per R block: 50·200 + 50.

More DBMS and SQL questions

Exams that ask this topic