| CPC G06F 16/2454 (2019.01) [G06F 16/24542 (2019.01)] | 18 Claims |

|
1. A computer-implemented method for improving efficiency of parameterized query optimization, the method comprising:
receiving a parameterized query written in a declarative language, wherein the parameterized query comprises a placeholder which can be assigned different values when the parameterized query is executed;
generating a first query plan, wherein generating the first query plan comprises performing a first compilation session of the parameterized query in which the placeholder has no assigned value, wherein performing the first compilation session comprises:
generating an intermediate representation of the parameterized query, wherein the intermediate representation describes a relational algebra expression to implement the parameterized query; and
generating the first query plan based on the intermediate representation;
serializing the intermediate representation into an abstract query plan; and
generating a second query plan different from the first query plan, wherein generating the second query plan comprises performing a second compilation session of the parameterized query in which the placeholder has an assigned value, wherein performing the second compilation session comprises:
providing the abstract query plan and the assigned value as input to the second compilation session;
deserializing the abstract query plan into the intermediate representation; and
reusing the intermediate representation to generate the second query plan; and
executing the parameterized query using the second query plan.
|