CS FundamentalsModerateGATE

A table has 1,000,000 rows, and a column's selectivity (distinct values / total rows) is estimated as 1/100,000. Roughly how many rows would a query optimizer expect an equality predicate on this column to return, assuming uniform distribution?

  1. A. About 10 rows
  2. B. About 100,000 rows
  3. C. About 1 row
  4. D. About 1,000 rows

Correct answer: A. About 10 rows

Expected matching rows ≈ total rows × selectivity = 1,000,000 × (1/100,000) = 10. This simple uniform-distribution estimate is exactly what histograms are meant to improve on when the real data is skewed.

More DBMS and SQL questions

Exams that ask this topic