US 6,983,275 B2
Optimizing database query by generating, determining the type of derived predicate based on monotonicity of the column generating expression for each remaining inequality predicate in the list of unexamined predicates
Fred Koo, Thornhill (Canada); and Timothy Ray Malkemus, Round Rock, Tex. (US)
Assigned to International Business Machines Corporation, Armonk, N.Y. (US)
Filed on Apr. 16, 2002, as Appl. No. 10/124,178.
Prior Publication US 2003/0195881 A1, Oct. 16, 2003
Int. Cl. G06F 17/30 (2006.01)
U.S. Cl. 707—5 10 Claims
OG exemplary drawing
 
1. A method for use in a database management system for generating a derived predicate from a selected database query, the query being made of a table containing at least one column generating expression, said method comprising:
(a) for each column and each simple equality predicate in the query, determining whether the predicate can be used together with an associated column generating expression to derive an additional predicate, deriving the additional predicate, adding the derived predicate to the query, and removing each predicate used in the derivation from a list of unexamined predicates;
(b) examining the monotonicity of the column generating expression if there is any remaining inequality predicate in the list of unexamined predicates;
(c) determining the type of derived predicate based on the monotonicity of the column generating expression for each remaining inequality predicate in the list of unexamined predicates; and
(d) generating the resulting derived predicate from each of the remaining inequality predicates.