Mechanism for optimizing parallel execution of queries on symmetric resources
First Claim
1. A method comprising:
- receiving a logical execution plan for a database query corresponding to a plurality of tables of a database, wherein the logical execution plan comprises one or more operators;
receiving an operator cost for each of the operators in the logical execution plan;
computing a first accumulated processing cost for a first of the tables based on the logical execution plan and operator costs corresponding to the first table;
computing a second accumulated processing cost for a second of the tables based on the logical execution plan and operator costs corresponding to the second table;
comparing the first accumulated processing cost and the second accumulated processing cost to determine a table with a highest accumulated processing cost; and
responsive to comparing the accumulated processing costs, computing a physical execution plan that requires partitioning the table with the highest accumulated processing cost.
1 Assignment
0 Petitions
Accused Products
Abstract
A method that comprises receiving a logical execution plan for a database query corresponding to a plurality of tables of the database, wherein the logical execution plan comprises one or more operators, receiving an operator cost for each of the operators in the logical execution plan, computing a first accumulated processing cost for a first of the tables based on the logical execution plan, operator selectivity, and operator costs corresponding to the first table, computing a second accumulated processing cost for a second of the tables based on the logical execution plan, operator selectivity, and operator costs corresponding to the second table, comparing the first accumulated processing cost and the second accumulated processing cost to determine a table with the highest accumulated processing cost, and responsive to comparing the accumulated processing costs, computing a physical execution plan that requires partitioning the table with the highest accumulated processing cost.
25 Citations
20 Claims
-
1. A method comprising:
-
receiving a logical execution plan for a database query corresponding to a plurality of tables of a database, wherein the logical execution plan comprises one or more operators; receiving an operator cost for each of the operators in the logical execution plan; computing a first accumulated processing cost for a first of the tables based on the logical execution plan and operator costs corresponding to the first table; computing a second accumulated processing cost for a second of the tables based on the logical execution plan and operator costs corresponding to the second table; comparing the first accumulated processing cost and the second accumulated processing cost to determine a table with a highest accumulated processing cost; and responsive to comparing the accumulated processing costs, computing a physical execution plan that requires partitioning the table with the highest accumulated processing cost. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A method comprising:
-
receiving instructions for querying data in a database comprising a plurality of tables; receiving an accumulated operator selectivity related to a first table by execution of the instructions; computing a first accumulated processing cost for the first table based on the operator selectivity of the first table; receiving an accumulated operator selectivity related to a second table by execution of the instructions; computing a second accumulated processing cost for the second table based on the operator selectivity of the second table; comparing the first accumulated processing cost and the second accumulated processing cost; and selecting a table for partitioning in response to the comparison such that the table selected for partitioning has a highest accumulated processing cost. - View Dependent Claims (10, 11, 12, 13, 14, 15)
-
-
16. An apparatus comprising:
-
a port configured to receive; a query tree associated with a query to be performed on a plurality of database tables by a plurality of threads; a number of records stored in each table; a plurality of operator costs, each corresponding to an operator identified by the query tree and one of the tables; and a plurality of accumulated effective selectivity values, each corresponding to one of the operators identified by the query tree and one of the tables; and a processor coupled to the port and configured to; compute an accumulated processing cost for each table comprising a product of a number of records stored in the table multiplied by a sum of the operator costs corresponding with the table and multiplied by the accumulated effective selectivity value corresponding to the table; and compute a query execution plan for the query in response to a comparison that comprises instructions for partitioning one of the database tables with a highest accumulated processing cost. - View Dependent Claims (17, 18, 19, 20)
-
Specification