Patent attributes
Embodiments relate to a system, computer program product and method for database query optimization. An aspect includes a method that extracts complex predicates from a query statement, the query statement having at least two complex predicates. The method then executes a query associated with the query statement and obtains at least a respective execution structure cost (ΔTi) for each of the complex predicates. The method also calculates an overall execution structure cost corresponding to each of the complex predicates, the complex predicates being arranged according to result of the query and the execution structure costs (ΔTi); and optimizes a database query by selecting the arrangement of complex predicates having a lowest overall execution structure cost.