The result size of a query that involves multiple attributes from the same relation depends on these attributes’ joint data distribution,i.e., the frequencies of all combinations of attribute values. To simplify the estimation of that size, most commercial systems make the attributevalue independenceassumptionandmaintainstatistics(typically histograms) on individual attributes only. In reality, this assumption is almost always wrong andthe resulting estimations tend to be highly inaccurate. In this paper, we propose two main alternatives to effectively approximate (multi-dimensional) joint data distributions. (a) Using a multi-dimensional histogram, (b) Using the Singular Value Decomposition (SVD) technique from linear algebra. An extensive set of experiments demonstrates the advantages and disadvantages of the two approaches and the benefits of both compared to the independence assumption.
Viswanath Poosala, Yannis E. Ioannidis