A method of estimating results of a database query, the results are
estimated by performing a sampling of weighted tuples in a database based
on a probability of usage of tuples required in executing a workload. A
probability is associated with each tuple sampled. An aggregate is
computed over values in each sampled tuple while multiplying by the
inverses of the probabilities associated with each tuple sampled.