1. A computer-program product tangibly embodied in a non-transitory machine-readable storage medium, the storage medium having instructions stored thereon, and the instructions being operable to cause a data-processing apparatus to perform operations including: accessing a data set that includes multiple entries, each of the entries including data corresponding to multiple variables; grouping the multiple entries into group-by subsets, wherein the group-by subsets are formed on two or more group-by variables, and wherein the group-by subsets are subsets of the data set; determining cardinality data for each of the group-by subsets, wherein cardinality data represents a number of entries in a group-by subset; generating at least one summary of data in each of the group-by subsets, wherein each of the summaries includes the cardinality data determined for the group-by subset; initializing objects for the group-by subsets, wherein each of the objects include the cardinality data and the at least one summary, and wherein each of the objects includes values of the group-by variables used in forming the group-by subset; and generating multiple statistical summaries of the data set using the objects.