CS FundamentalsHardGATE CS

R has 2000 tuples and S has 5000 tuples. The join attribute A has 50 distinct values in R and 200 in S. Under the usual uniformity and containment assumptions, what is the estimated size of R ⋈ S?

  1. A. 200,000
  2. B. 10,000
  3. C. 50,000
  4. D. 40,000

Correct answer: C. 50,000

The estimate is |R| × |S| / max(V(A, R), V(A, S)) = 2000 × 5000 / 200 = 50,000. Dividing by the smaller count (50) overestimates it as 200,000.

More DBMS and SQL questions

Exams that ask this topic