10.2 The Power of Sampling 189
Department table is small, it’s possible in this case to sample only on the Employee
table, and extrapolate by the inverse of the sampling rate. In many cases this is not pos-
sible or is nontrivial to detect. Even if the Department table is large, such sampling is
still feasible provided that there is an index available on DEPARTMENT.DEPTNO.
This example is a special case of a star join, where a large “fact” table is joined to one or
more “dimension” tables. In this very common setting, it is often possible to simply
sample from the fact table and scale-up the number of rows by the inverse of the sam-
pling rate.
Unlike the foregoing setting, estimates of the number of distinct values are
required when a materialized ...