CPC G06F 16/24542 (2019.01) [G06F 11/3409 (2013.01); G06F 16/24528 (2019.01); G06F 16/24539 (2019.01)] | 28 Claims |
1. A network-based database system comprising:
at least one hardware processor; and
a memory storing instructions that cause the at least one hardware processor to perform operations comprising:
receiving a query, the query including a statement for performing the query;
performing a first lookup operation on a multi-phase cache based on the query;
performing, in response to a first cache miss of the multi-phase cache, parsing of the statement from the query;
performing, based on the parsing, a compilation process on the query to generate a compiled query plan, the compilation process determining an optimization and a generalization for the query;
determining that the compiled query plan is cacheable;
registering, in response to the compiled query plan being cacheable, a dummy entry in the multi-phase cache;
receiving a second particular query, the second particular query including a second particular statement for performing the second particular query;
performing, in response to a cache miss of the multi-phase cache based on the dummy entry, parsing of the second particular statement from the second particular query;
performing a partial auto-parameterization process based on the parsed second particular statement;
performing a second particular lookup operation on the multi-phase cache based on the partial auto-parameterization process;
determining a set of generalization requirements, the determining based on performing a full auto-parameterization process that generates a modified parse tree with the set of generalization requirements being applied; and
performing the compilation process on the second particular query to generate a compiled second particular query plan, the compilation process using the set of generalization requirements.
|