Method and mechanism for handling arbitrarily-sized XML in SQL operator tree
First Claim
1. A method for processing a program statement in a database query language, the program statement corresponding to a plurality of operators, wherein an operator tree can be identified based upon the plurality of operators, the operator tree comprising a parent operator node, the parent operator node possibly associated with one or more child operator nodes, the method comprising:
- (a) identifying whether one or more child nodes exist;
(b) for each of the identified one or more child nodes, determining if the child node relates to an operator for which top-down processing can be performed;
(c) calling and executing the operators from (a) for the child nodes that are eligible for top-down processing;
(d) generating output results for a child node that is not eligible for top-down processing; and
(e) outputting the output results to a data stream.
1 Assignment
0 Petitions
Accused Products
Abstract
Disclosed is a method and mechanism for processing expressions and operator trees. An approach is particularly useful to optimize processing of XML statements with respect to SQL operators. A top-down processing approach can be taken to directly output data from operators to a data stream. In addition, multiple processing approaches can be taken within a single expression tree, with some operators processed using the top-down approach and other operators processed with the bottom-up approach. Even data that can not be streamed is copied fewer times using this approach, intermediate values from bottom-up processing may still be streamed if it is used by an operator that is eligible for top-down processing.
119 Citations
29 Claims
-
1. A method for processing a program statement in a database query language, the program statement corresponding to a plurality of operators, wherein an operator tree can be identified based upon the plurality of operators, the operator tree comprising a parent operator node, the parent operator node possibly associated with one or more child operator nodes, the method comprising:
-
(a) identifying whether one or more child nodes exist;
(b) for each of the identified one or more child nodes, determining if the child node relates to an operator for which top-down processing can be performed;
(c) calling and executing the operators from (a) for the child nodes that are eligible for top-down processing;
(d) generating output results for a child node that is not eligible for top-down processing; and
(e) outputting the output results to a data stream. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14)
-
-
15. A method for processing a program statement, the program statement corresponding to a plurality of operators, wherein an operator tree can be identified based upon the plurality of operators, the operator tree comprising a parent operator node, the method comprising:
-
(a) determining whether the parent operator node is related to a first child operator node that is eligible for top-down processing; and
(b) evaluating the first child operator node with top-down processing if the child operator is eligible for top-down processing, wherein the output from the first child operator node is output to a data stream. - View Dependent Claims (16, 17, 18, 19, 20, 21, 22, 23, 24, 25)
-
-
26. A computer program product comprising a computer usable medium having executable code to execute a process for processing a program statement in a database query language, the program statement corresponding to a plurality of operators, wherein an operator tree can be identified based upon the plurality of operators, the operator tree comprising a parent operator node, the parent operator node possibly associated with one or more child operator nodes, the process comprising:
-
(a) identifying whether one or more child nodes exist;
(b) for each of the identified one or more child nodes, determining if the child node relates to an operator for which top-down processing can be performed;
(c) calling and executing the operators from (a) for the child nodes that are eligible for top-down processing;
(d) generating output results for a child node that is not eligible for top-down processing; and
(e) outputting the output results to a data stream.
-
-
27. A system for processing a program statement in a database query language, the program statement corresponding to a plurality of operators, wherein an operator tree can be identified based upon the plurality of operators, the operator tree comprising a parent operator node, the parent operator node possibly associated with one or more child operator nodes, the method comprising:
-
(a) means for identifying whether one or more child nodes exist;
(b) means for determining if the child node relates to an operator for which top-down processing can be performed for each of the identified one or more child nodes;
(c) means for calling and executing the operators from (a) for the child nodes that are eligible for top-down processing;
(d) means for generating output results for a child node that is not eligible for top-down processing; and
(e) means for outputting the output results to a data stream.
-
-
28. A computer program product comprising a computer usable medium having executable code to execute a process for processing a program statement, the program statement corresponding to a plurality of operators, wherein an operator tree can be identified based upon the plurality of operators, the operator tree comprising a parent operator node, the process comprising:
-
(a) determining whether the parent operator node is related to a first child operator node that is eligible for top-down processing; and
(b) evaluating the first child operator node with top-down processing if the child operator is eligible for top-down processing, wherein the output from the first child operator node is output to a data stream.
-
-
29. A system for processing a program statement, the program statement corresponding to a plurality of operators, wherein an operator tree can be identified based upon the plurality of operators, the operator tree comprising a parent operator node, the method comprising:
-
(a) means for determining whether the parent operator node is related to a first child operator node that is eligible for top-down processing; and
(b) means for evaluating the first child operator node with top-down processing if the child operator is eligible for top-down processing, wherein the output from the first child operator node is output to a data stream.
-
Specification