1. A method for managing a new continuous query that includes folding a new continuous query into a shared continuous query plan (SCP) associated with a global range table, the method comprising: receiving via a computer readable storage medium a new continuous query; compiling the new continuous query to generate an iterator model plan (IMP) and an associated local range table that includes a list of range variables, each of which uniquely identifies an object in the new continuous query, and wherein the IMP corresponds to an execution plan generated for the new continuous query and comprises one or more IMP operators, each of which includes one or more expressions whose variables are associated with the local range table; analyzing the one or more IMP operators of the IMP and one or more SCP operators of the SCP to produce one or more variable transforms and one or more plan items; wherein the one or more variable transforms modify the one or more expressions of the one or more IMP operators by associating the one or more IMP operators with variables of a global range table; wherein the one or more plan items comprise one or more groups of the one or more IMP operators; applying the variable transforms to modify the variables of the one or more iterator model plan IMP operators; generating a continuous query operator based on each plan item included in the one or more plan items; and providing the generated continuous query operator to a shared continuous query plan.
1. A method for managing a new continuous query that includes folding a new continuous query into a shared continuous query plan (SCP) associated with a global range table, the method comprising: receiving via a computer readable storage medium a new continuous query; compiling the new continuous query to generate an iterator model plan (IMP) and an associated local range table that includes a list of range variables, each of which uniquely identifies an object in the new continuous query, and wherein the IMP corresponds to an execution plan generated for the new continuous query and comprises one or more IMP operators, each of which includes one or more expressions whose variables are associated with the local range table; analyzing the one or more IMP operators of the IMP and one or more SCP operators of the SCP to produce one or more variable transforms and one or more plan items; wherein the one or more variable transforms modify the one or more expressions of the one or more IMP operators by associating the one or more IMP operators with variables of a global range table; wherein the one or more plan items comprise one or more groups of the one or more IMP operators; applying the variable transforms to modify the variables of the one or more iterator model plan IMP operators; generating a continuous query operator based on each plan item included in the one or more plan items; and providing the generated continuous query operator to a shared continuous query plan. 8. The method according to claim 1 , further comprising producing for each variable transform, instructions to re-target variables in an iterator model plan sub-plan from the local range table to the global range table.