Methods and apparatus of shared expression evaluation across RDBMS and storage layer
First Claim
1. A method for optimizing query execution, the method comprising:
- identifying, in a query execution plan compiled for a query, a plurality of target operators that includes an expression that computes a common value;
for a first target operator of the plurality of target operators, modifying a row output of the first target operator to add a column for an evaluation result comprising the common value;
for at least one second target operator of the plurality of target operators, modifying a row input of the second target operator to add a column for the evaluation result comprising the common value;
after modifying the row output for the first target operator and the row input for at least the second target operator, executing the query according to the plurality of target operators;
wherein during said executing, the evaluation result comprising the common value is shared by passing the evaluation result from the row output for the first target operator to the row input for the at least one second target operator;
wherein the method is performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
Techniques are provided for sharing expression evaluation across a database management system and a storage layer. According to an embodiment, a plurality of target operators are identified that include a common expression. Each respective target operator corresponds to a step that evaluates the common expression during query execution. The plurality of target operators are modified to enable sharing of an evaluation result of the common expression. The query is executed according to the target operators. During query execution, the evaluation result is shared by the target operators. In other embodiments, the evaluation of the common expression is pushed to a storage layer. During query execution, a database management system retrieves the evaluation result of the common expression from the storage layer.
33 Citations
21 Claims
-
1. A method for optimizing query execution, the method comprising:
-
identifying, in a query execution plan compiled for a query, a plurality of target operators that includes an expression that computes a common value; for a first target operator of the plurality of target operators, modifying a row output of the first target operator to add a column for an evaluation result comprising the common value; for at least one second target operator of the plurality of target operators, modifying a row input of the second target operator to add a column for the evaluation result comprising the common value; after modifying the row output for the first target operator and the row input for at least the second target operator, executing the query according to the plurality of target operators; wherein during said executing, the evaluation result comprising the common value is shared by passing the evaluation result from the row output for the first target operator to the row input for the at least one second target operator; wherein the method is performed by one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. One or more non-transitory computer-readable media storing sequences of instructions, which, when executed by one or more processors, cause:
-
identifying, in a query execution plan compiled for a query, a plurality of target operators that includes an expression that computes a common value; for a first target operator of the plurality of target operators, modifying a row output of the first target operator to add a column for an evaluation result comprising the common value; for at least one second target operator of the plurality of target operators, modifying a row input of the second target operator to add a column for the evaluation result comprising the common value; after modifying the row output for the first target operator and the row input for at least the second target operator, executing the query according to the plurality of target operators; wherein during said executing, the evaluation result comprising the common value is shared by passing the evaluation result from the row output for the first target operator to the row input for the at least one second target operator. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21)
-
Specification