8.6 Designing MDC Tables 159
Using an SQL query we can improve on this by actually querying the number of
unique combinations of COLOR, YEAR, and REGION, which will almost always be
most accurate and a smaller number than the simple product of unique values of each
column. Why will the result be different? Correlation. The simple estimation method
based on individual column cardinality assumes dimension independence, namely that
there is no correlation between any of the dimensions, which is a worst-case scenario. In
more real-world systems, some degree of correlation is found between dimensions,
reducing the number of unique combinations. A discussion on counting and sampling
for MDC storage estimation can be found in Chapter 10.
8.6 Designing MDC ...