1. A method for estimating a cardinality of an expression, the method comprising: matching the expression with a stored expression; retrieving statistics associated with the stored expression; and estimating the cardinality of the expression based on the statistics.