Parallel query processing techniques for minus and intersect operators
First Claim
1. A machine-executed method comprising the steps of:
- receiving a query that includes a particular operator,wherein the particular operator is one of MINUS and INTERSECT;
wherein, within the query, the operands to the particular operator include a left-hand source and a right-hand source;
determining that the particular operator appears inside a correlated subquery within the query;
based on the step of determining that the particular operator appears inside the correlated subquery, determining not to transform the query into another query that has an operator that is different from the particular operator;
based on the step of determining not to transform the query into another query that has an operator that is different from the particular operator, performing the steps of;
generating a plurality of query plans for executing said query, wherein a portion of each of the query plans includes a parallelization plan for executing the operation associated with said particular operator, and wherein the respective parallelization plan for each query plan of said plurality of query plans is different than the parallelization plan of any other query plan of said plurality of query plans;
generating cost estimates for the query plans in said plurality of query plans; and
selecting from said plurality of query plans a particular query plan to execute based, at least in part, on the cost estimates,wherein each of said steps of said method is performed by one or more computing devices.
1 Assignment
0 Petitions
Accused Products
Abstract
Various techniques are described for processing database commands that include MINUS and/or INTERSECT operators. According to one technique, the database server executes the MINUS/INTERSECT in a specialized rowsource in parallel. In one approach, the specialized rowsource implements a sort merge-join like solution, where: a DISTINCT SORT is performed on each input, a left and right pointer is maintained on the respective input streams of tuples, the left or right pointer is incremented based on whether there is a match between the tuples pointed-to by the pointers, and the tuple of the left side is returned (or not returned) based on whether there is a match. Techniques are described for generating multiple query plans for executing a query, where each of the query plans includes a plan portion for executing, in parallel, the operation associated with a MINUS/INTERSECT operator. Cost estimates are generated for the query plans. The database server selects from the query plans a particular query plan to execute based, at least in part, on the cost estimates.
60 Citations
20 Claims
-
1. A machine-executed method comprising the steps of:
-
receiving a query that includes a particular operator, wherein the particular operator is one of MINUS and INTERSECT; wherein, within the query, the operands to the particular operator include a left-hand source and a right-hand source; determining that the particular operator appears inside a correlated subquery within the query; based on the step of determining that the particular operator appears inside the correlated subquery, determining not to transform the query into another query that has an operator that is different from the particular operator; based on the step of determining not to transform the query into another query that has an operator that is different from the particular operator, performing the steps of; generating a plurality of query plans for executing said query, wherein a portion of each of the query plans includes a parallelization plan for executing the operation associated with said particular operator, and wherein the respective parallelization plan for each query plan of said plurality of query plans is different than the parallelization plan of any other query plan of said plurality of query plans; generating cost estimates for the query plans in said plurality of query plans; and selecting from said plurality of query plans a particular query plan to execute based, at least in part, on the cost estimates, wherein each of said steps of said method is performed by one or more computing devices. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20)
-
Specification