GATE CS 2014, set 2 · Question 40 · Databases · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer

Consider a join (relation algebra) between relations r(R) and s(S) using the nested loop method. There are 3 buffers each of size equal to disk block size, out of which one buffer is reserved for intermediate results. Assuming size(r(R))<size(s(S)), the join will have fewer number of disk block accesses if

  1. (A) relation r(R) is in the outer loop.
  2. (B) relation s(S) is in the outer loop.
  3. (C) join selection factor between r(R) and s(S) is more than 0.5.
  4. (D) join selection factor between r(R) and s(S) is less than 0.5.
Answer

Answer (A)

Answer from the official GATE CS 2014 answer key.

The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes