an apparatus , program product and method that employ a dynamic use of look ahead predicate generation that will enable the database , database engine , and / or query optimizer to alter the processing of a query , and react to sub - optimal access plan selection and additional factors arising after processing has begun , to heal many poor performing queries . conventional use of lpg requires the query optimizer to decide whether or not to use lpg before the processing of a query begins . as a result , the query optimizer may not only make sub - optimal decisions , but the query optimizer may not consider additional factors that may arise as the query is processing . however , the dynamic use of lpg allows predicates to be built after processing of the query has started and the ability to alter the query &# 39 ; s processing to improve query performance .