A method and system for accurately estimating a result size of a Group-By
operation in a relational database. The estimate utilizes the probability
of union of the columns involved in the operation, as well as the
relative cardinality of each column with respect to the other columns in
the operation. In addition, the estimate incorporates the use of table
filters when indicated such that table filters are applied prior to
determining the size of the tables in the operation, as well as including
equivalent columns into the list of columns that are a part of the
Group-By operation. Accordingly, the estimate of the result size of the
operation includes influencing factors that provide an accurate
estimation of system memory requirements.