The invention provides methods for optimizing a database management system process
of a query. The methods are suitable for execution in a properly configured computer
system. In an embodiment of the invention, a plurality of single column statistics
are collected for a plurality of columns. This plurality of single column statistics
provides an estimate of row counts and unique entry counts for a singe column operator.
A preferred single column statistic is selected from the plurality of single column
statistics according to a predetermined criteria. The preferred single column statistic
is then stored. A selectivity estimate is then determined for predicates in the
query using the preferred single column statistic. The selectivity estimate is
used in optimizing processing of the query by the database management system.