A computer-implemented method to execute a query to generate a query result, the method comprising: receiving a query in a database application; processing the query, wherein said processing the query comprises: generating a query plan for the query, the query plan comprising at least a first set of execution steps configured to be executed to generate a first query sub-result, the first set of execution steps comprising: an initial step configured to be executed to generate first step results after receiving execution control, and pass execution control to a step different than the initial step, at least one intermediate step configured to generate second step results after receiving execution control, and pass execution control to any step of the first set of execution steps, and a final step configured to, after receiving execution control, generate the first query sub-result based at least in part on the initial step results and the intermediate step results; and executing the query plan to generate a final query result based on the first query sub-result by passing execution control to the initial step of the first set of execution steps of the query plan, wherein the method is characterized in that it further includes: generate the executable query plan to include a second set of execution steps; and re-generate a portion of the executable query plan during execution of the executable query plan, wherein the regenerating includes re-compiling a portion of the query plan corresponding to the second set of execution steps based on a discovery of incorrect assumptions made during generation of the executable query plan, where the discovery is made by executing the first set of execution steps. receiving a query in a database application; processing the query, wherein said processing the query comprises: generating a query plan for the query, the query plan comprising at least a first set of execution steps configured to be executed to generate a first query sub-result, the first set of execution steps comprising: an initial step configured to be executed to generate first step results after receiving execution control, and pass execution control to a step different than the initial step, at least one intermediate step configured to generate second step results after receiving execution control, and pass execution control to any step of the first set of execution steps, and a final step configured to, after receiving execution control, generate the first query sub-result based at least in part on the initial step results and the intermediate step results; and executing the query plan to generate a final query result based on the first query sub-result by passing execution control to the initial step of the first set of execution steps of the query plan, wherein the method is characterized in that it further includes: generate the executable query plan to include a second set of execution steps; and re-generate a portion of the executable query plan during execution of the executable query plan, wherein the regenerating includes re-compiling a portion of the query plan corresponding to the second set of execution steps based on a discovery of incorrect assumptions made during generation of the executable query plan, where the discovery is made by executing the first set of execution steps. an initial step configured to be executed to generate first step results after receiving execution control, and pass execution control to a step different than the initial step, at least one intermediate step configured to generate second step results after receiving execution control, and pass execution control to any step of the first set of execution steps, and a final step configured to, after receiving execution control, generate the first query sub-result based at least in part on the initial step results and the intermediate step results; and executing the query plan to generate a final query result based on the first query sub-result by passing execution control to the initial step of the first set of execution steps of the query plan, wherein the method is characterized in that it further includes: generate the executable query plan to include a second set of execution steps; and re-generate a portion of the executable query plan during execution of the executable query plan, wherein the regenerating includes re-compiling a portion of the query plan corresponding to the second set of execution steps based on a discovery of incorrect assumptions made during generation of the executable query plan, where the discovery is made by executing the first set of execution steps. generate the executable query plan to include a second set of execution steps; and re-generate a portion of the executable query plan during execution of the executable query plan, wherein the regenerating includes re-compiling a portion of the query plan corresponding to the second set of execution steps based on a discovery of incorrect assumptions made during generation of the executable query plan, where the discovery is made by executing the first set of execution steps.