CS FundamentalsModerateGATE CS · Product placement

R has 2000 tuples in 100 blocks and S has 10000 tuples in 400 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. 800,100 and 800,000
  2. B. 1,000,400 and 40,400
  3. C. 800,100 and 40,100
  4. D. 20,000,100 and 40,100

Correct answer: C. 800,100 and 40,100

Tuple NL reads S once per R tuple: 2000·400 + 100. Block NL reads S once per R block: 100·400 + 100.

More DBMS and SQL questions

Exams that ask this topic