Patent ID: 7051034

Claim:
A computer-implemented method for managing execution of a restartable sub-tree of a query execution plan, the method comprising the steps of: generating a query execution plan for a query that includes a sub-query, wherein the execution plan includes a restartable sub-tree associated with the sub-query; performing at query execution runtime one or more determinations from a set of determinations that consists of; determining the amount of time to restart the sub-tree using two or more parallel processes, wherein restarting the sub-tree comprises initiating the two or more parallel processes to execute the sub-tree and allocating the two or more processes to perform various parts of the sub-tree, and determining the amount of time to probe the sub-tree using the two or more parallel processes, wherein probing the sub-tree comprises determining whether a row meets one or more conditions specified in the sub-query to which the sub-tree is associated; and determining at query execution runtime whether using two or more parallel processes is a preferred mode of executing the sub-tree based, at least in part, on the outcome of the one or more determinations.