Method for two-stage query optimization in massively parallel processing database clusters
AssigneeFuturewei Technologies, Inc.
InventorsJason Yang Sun, Qingqing Zhou, Mohan Singamshetty
Life of this patent
Estimating the term…
Abstract
Queries may be processed more efficiently in an massively parallel processing (MPP) database by locally optimizing the global execution plan. The global execution plan and a semantic tree may be provided to MPP data nodes by an MPP coordinator. The MPP data nodes may then use the global execution plan and the semantic tree to generate a local execution plan. Thereafter, the MPP data nodes may select either the global execution plan or the local execution plan is accordance with a cost evaluation.
Claims21
A method for processing queries in a massively parallel processing (MPP) database, the method comprising:
- receiving, by an MPP data node, a global execution plan and a semantic tree from an MPP coordinator, the MPP data node being one of a plurality of MPP data nodes in the MPP database, wherein the global execution plan is generated by the MPP coordinator without access to local configuration information native to the MPP data node, and wherein the MPP coordinator is a device that is separate and distinct from the MPP data node;
- generating, by the MPP data node, a local execution plan in accordance with the semantic tree and the local configuration information native to the MPP data node, wherein the local execution plan is an alternative to the global execution plan such that one of the local execution plan and the global execution plan is executed by the same MPP data node, wherein generating the local execution plan comprises identifying a sub-tree of the semantic tree, fortifying the sub-tree in accordance with a set of constraints enforced by the global execution plan, and generating the local execution plan in accordance with the fortified sub-tree, the set of constraints enforced by the global execution plan including at least one of an ordering of a result set, a distinctness of the result set, and a number of rows contained in the result set;
- and
- selecting one of the global execution plan and the local execution plan for execution by the same MPP data node, wherein the global execution plan is not executed by the MPP node when the local execution plan is selected for execution by the MPP data node, and wherein the local execution plan is not executed by the MPP node when the global execution plan is selected for execution by the MPP data node.
A massively parallel processing (MPP) data node in an MPP database, the MPP data node comprising:
- a processor;
- and
- a computer readable storage medium storing programming for execution by the processor, the programming including instructions to:
- receive a global execution plan and a semantic tree from an MPP coordinator, the MPP data node being one of a plurality of MPP data nodes in the MPP database, wherein the global execution plan is generated by the MPP coordinator without access to local configuration information native to the MPP data node, and wherein the MPP coordinator is a device that is separate and distinct from the MPP data node;
- generate a local execution plan in accordance with the semantic tree and the local configuration information native to the MPP data node, wherein the local execution plan is an alternative to the global execution plan such that one of the local execution plan and the global execution plan is executed by the same MPP data node;
- and
- select one of the global execution plan and the local execution plan for execution by the MPP data node, wherein the global execution plan is not executed by the MPP node when the local execution plan is selected for execution by the MPP data node, wherein the local execution plan is not executed by the MPP node when the global execution plan is selected for execution by the MPP data node, wherein the local configuration information specifies an amount of data stored by the MPP data node, wherein data is non-uniformly distributed in the MPP database such that the amount of data stored by the MPP data node differs from amounts of data stored in other MPP data nodes of the MPP database, and wherein the global execution plan is generated by the MPP coordinator under the assumption that data is uniformly distributed amongst a plurality of MPP data nodes in the MPP database.
A method for processing queries in a massively parallel processing (MPP) database, the method comprising:
- receiving, by an MPP data node, a global execution plan and a semantic tree from an MPP coordinator, the MPP data node being one of a plurality of MPP data nodes in the MPP database, wherein the global execution plan is generated by the MPP coordinator without access to local configuration information native to the MPP data node, and wherein the MPP coordinator is a device that is separate and distinct from the MPP data node;
- generating, by the MPP data node, a local execution plan in accordance with the semantic tree and the local configuration information native to the MPP data node, wherein the local execution plan is an alternative to the global execution plan such that one of the local execution plan and the global execution plan is executed by the same MPP data node;
- and
- selecting one of the global execution plan and the local execution plan for execution by the same MPP data node, wherein the global execution plan is not executed by the MPP node when the local execution plan is selected for execution by the MPP data node, and wherein the local execution plan is not executed by the MPP node when the global execution plan is selected for execution by the MPP data node wherein the local configuration information specifies an amount of data stored by the MPP data node, wherein data is non-uniformly distributed in the MPP database such that the amount of data stored by the MPP data node differs from amounts of data stored in other MPP data nodes of the MPP database, and wherein the global execution plan is generated by the MPP coordinator under the assumption that data is uniformly distributed amongst a plurality of MPP data nodes in the MPP database.
Dependencies are inferred from the claim text.