摘要 |
A system and method for executing query plans preprocesses a user's queries to identify and extract select parameters of the query, creates a skeletal query with reference to the extracted parameters, creates and compiles an executable version of the skeletal query, then executes the compiled version of the skeletal query using the particular parameters in the current query. The compiled version of the parameterized skeletal query is stored, and when another query is submitted that matches the skeletal query (but with potentially different parameters), the previously compiled skeleton query is executed with the parameters of this latter query. |
主权项 |
1. A method comprising:
receiving, at a processing system that includes a computer processor and memory, a user query for selecting data from a database; parsing, by the processing system, the user query to identify a form of the user query and one or more arguments associated with the user query; determining, by the processing system, whether the form of the user query corresponds to a skeletal query form of a set of skeletal query forms; retrieving, by the processing system, a compiled skeletal query corresponding to the skeletal query form from a database, the compiled skeletal query including machine code that is executable directly by the processing system; executing, by the processing system, the machine code corresponding to the skeletal query form using the one or more arguments associated with the user query; and returning, by the processing system, results of the execution of the machine code in response to the user query. |