CS FundamentalsModerateGATE CS

R has 10,000 tuples in 500 blocks and is the outer relation of an indexed nested-loop join with S. S has a B+ tree on the join attribute (its primary key) of height 3, and each probe costs 3 index blocks plus 1 data block. How many block accesses does the join need?

  1. A. 30,500
  2. B. 40,000
  3. C. 40,500
  4. D. 2,500

Correct answer: C. 40,500

Each of the 10,000 outer tuples needs one probe of 3 + 1 = 4 accesses, plus 500 accesses to scan R: 500 + 40,000 = 40,500. Counting probes per block of R instead of per tuple gives the much smaller wrong figure.

More DBMS and SQL questions

Exams that ask this topic