1. A method comprising: receiving a request for a number of unique values within a data set; calculating a first estimated cardinality of unique values in the data set by evaluating one or more values in the data set; determining whether the first estimated cardinality is within a particular range; if it is determined that the first estimated cardinality is within the particular range, then: using the first estimated cardinality as a lookup value into a plurality of mapped values corresponding to the particular range, identifying, from the plurality of mapped values, a first mapped value that corresponds to the first estimated cardinality, and based on the first mapped value and the first estimated cardinality, calculating a second estimated cardinality of unique values in the data set; and identifying the second estimated cardinality as a response to the request for the number of unique values in the data set without having to determine the exact number of unique values in the data set; wherein the method is performed by one or more computing devices.