主权项 |
1. 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. |