Global query hint specification
AssigneeAmazon Technologies, Inc.
InventorsNeil Thombre, Anurag Windlass Gupta, Stefano Stefani, Aleksandras Surna
Life of this patent
Estimating the term…
Abstract
A query optimizer may receive a query (e.g., from a source that generated the query). Input that specifies both a query hint string and a hint may be received to a hint specification interface. The hint may be applied to the query, from outside the query, to optimize a query execution plan. Applying the hint may be based, at least in part, on a query hint string. For example, which query block is associated with the query hint string may be determined. Upon such a determination, the hint may be applied to the determined query block.
Claims21
-20. (canceled)
A system, comprising:
- a memory;
- and
- one or more processors coupled to the memory, wherein the memory comprises program instructions that when executed by the one or more processors causes the one or more processors to:
- receive a query directed to a data store;
- separate from the query, receive a specification of both a query hint string and a hint;
- identify two or more query blocks of the query associated with the query hint string;
- optimize a query execution plan for the query, wherein to optimize the query execution plan the program instructions cause the one or more processors to apply the query hint to the two or more query blocks to modify the query from outside the query;
- and
- execute the query execution plan to query the data store.
A method, comprising:
- performing, by one or more computing devices:
- receiving a query directed to a data store;
- separate from the query, receiving a specification of both a query hint string and a hint;
- identifying two or more query blocks of the query associated with the query hint string;
- optimizing a query execution plan for the query, wherein to optimize the query execution plan the program instructions cause the one or more processors to apply the query hint to the two or more query blocks to modify the query from outside the query;
- and
- executing the query execution plan to query the data store.
The method of claim 1, wherein the data store is a distributed data store, wherein the distributed data store comprises a plurality of storage nodes, wherein one of the storage nodes is a leader node, wherein other ones of the storage nodes are compute nodes, wherein the leader node performs the receiving of the query, the receiving of the specification of both the query hint and the query hint string, the identifying of the two or more query blocks, and the optimizing of the query execution plan, and wherein the compute nodes perform the executing of the query execution plan.
A non-transitory, computer-readable storage medium, storing program instructions that when executed by one or more computing devices cause the one or more computing devices to implement:
- receiving a query directed to a data store;
- separate from the query, receiving a specification of both a query hint string and a hint;
- identifying two or more query blocks of the query associated with the query hint string;
- optimizing a query execution plan for the query, wherein to optimize the query execution plan the program instructions cause the one or more processors to apply the query hint to the two or more query blocks to modify the query from outside the query;
- and
- executing the query execution plan to query the data store.
Dependencies are inferred from the claim text.