A method, computer program, and computer network are disclosed for
executing database queries. The method includes identifying a first set
of conditions corresponding to a selected step for executing a query. A
second set of conditions corresponding to one or more steps for executing
the query that feed the selected step is identified. Each condition in
the first set is checked for mathematical redundancy, including
redundancy without equivalency, with regard to the other conditions in
the union of the conditions corresponding to the selected step and the
conditions in the second set. Each condition in the first set that is
redundant is included in a third set. If there is only one condition in
the third set, an identifier of the one condition is stored.