Patent ID: 7461050

Claim:
A method for estimating the cardinality resulting from the application of one or more partially applied predicates against a range-partitioned table of a database, the method comprising: identifying at least one key column, wherein the at least one key column at least partially defines one or more data partitions in the range-partitioned table; calculating at least one combination of partially applicable predicates; calculating the partial selectivities for the at least one combination of partially applicable predicates, determining a Query Execution Plan (QEP) based on the estimated cardinality; determining whether or not a particular predicate can be partially applied to achieve a useful result; computing a corresponding partial selectivity value for the particular predicate, if the particular predicate can be partially applied; and accessing the range-partitioned table in the database based on a plan specified by the OEP, wherein the partial selectivities, psel(pl, . . . , pt), after applying a number of predicates pl, . . . , pt, are equal to a number of qualified partitions divided by the total number of partitions; and wherein the partially applicable predicates filter the range-partitioned table of the database before full application of the predicate to exclude data partitions based on the partially applicable predicate.