Selecting alternate portions of a query plan for processing partial results generated separate from a query engine
AssigneeAmazon Technologies, Inc.
InventorsSangyong Hwang, Yongsik Yoon, Kamal Kant Gupta, Saileshwar Krishnamurthy
Life of this patent
Estimating the term…
Abstract
Alternative portions of a query plan to perform a query may be selected for processing partial results of a query. A query engine may generate a plan to perform a query that includes an operation that selects between different portions of the plan according to input data. The input data may be a partial result of the query generated by the data store instead of the query engine and provided to the query engine. The input data may be an individual item of the data set that is modified to a different version within a consistent view of the data set for the query.
Claims20
A system, comprising:
- a plurality of storage nodes, respectively comprising at least one processor and a memory, wherein items of a database are stored across the plurality of storage nodes;
- another processor and another memory that implement a query engine for the database;
- the query engine, configured to:
- receive from a client a query, including an aggregation function, that is directed to the database;
- generate a plan to perform the query at the query engine;
- perform the query according to the plan, wherein to perform the query the query engine is configured to:
- receive a requested partial result of the aggregation function generated from a plurality of items of the database from one of the storage nodes, wherein the requested partial result of the aggregation function is performed at one or more of the storage nodes instead of at the query engine;
- receive a requested individual item from the one storage node or another one of the storage nodes;
- modify the individual item to be within a consistent view of the data set identified for the query;
- select alternative portions of the plan to apply to the partial result and modified individual item as part of performing the aggregation function;
- and
- return a result for the query to the database.
A method, comprising:
- receiving from a client, at a query engine, a query, including an aggregation function, that is directed to a data set stored in a data store;
- performing the query at the query engine, comprising:
- receiving a requested partial result of the aggregation function generated from a plurality of items of the data set and performed at the data store instead of at the query engine;
- receiving a requested individual item from the data set;
- modifying the individual item to be within a consistent view of the data set identified for the query;
- and
- selecting alternative portions of a query plan to apply to the partial result and modified individual item as part of performing the aggregation function.
One or more non-transitory, computer-readable storage media, storing program instructions that when executed on or across one or more computing devices cause the one or more computing devices to implement:
- receiving from a client, at a query engine, a query, including an aggregation function, that is directed to a data set stored in a data store;
- generating a plan to perform the query at the query engine, wherein the plan comprises:
- an operation that selects between alternative portions of the plan to perform the aggregation function according on whether input data to the operation is:
- a partial result of the aggregation function generated from a plurality of items of the data set and performed at the data store instead of at the query engine;
- or
- an individual item received at the query engine from the data set and modified by the query engine to be within a consistent view of the data set identified for the query;
- and
- performing the plan at the query engine to return a result for the query.
Dependencies are inferred from the claim text.