CS FundamentalsHardGATE CS · Product placement

R has 1600 tuples in 80 blocks and S has 20000 tuples in 500 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,080 and 800,000
  2. B. 1,600,500 and 40,500
  3. C. 32,000,080 and 40,080
  4. D. 800,080 and 40,080

Correct answer: D. 800,080 and 40,080

Tuple NL reads S once per R tuple: 1600·500 + 80. Block NL reads S once per R block: 80·500 + 80.

More DBMS and SQL questions

Exams that ask this topic