Energy monetary cost aware query optimization
First Claim
Patent Images
1. A method of optimizing a query, comprising:
- determining a plurality of execution plans for executing a query, wherein each of the plurality of execution plans represents an alternative way of executing the query relative to the other execution plans in the plurality of execution plans, and wherein each of the plurality of execution plans includes a plurality of operations to be performed in executing the query and a schedule in which to perform operations in the plurality of operations;
for each of the plurality of execution plans;
determining a power consumption value for the execution plan, wherein the power consumption value approximates an amount of power that would be consumed by executing the query using the respective execution plan; and
determining a monetary cost for executing the query according to the execution plan, based on one or more pricing values and the determined power consumption value for the execution plan;
selecting a first execution plan from the plurality of execution plans to use in executing the query, based on the determined monetary cost for the first execution plan; and
executing the query according to the first execution plan, wherein an entirety of the query is executed once the first execution plan is completed.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments of the invention provide a method of optimizing a query, including determining an execution plan for use in executing the query, based on a monetary cost of the energy needed to execute the query. A query optimization component may determine a plurality of execution plans for the query. The query optimization component may then select one of the plans to use in executing the query based on the monetary cost calculated for the plan.
-
Citations
18 Claims
-
1. A method of optimizing a query, comprising:
-
determining a plurality of execution plans for executing a query, wherein each of the plurality of execution plans represents an alternative way of executing the query relative to the other execution plans in the plurality of execution plans, and wherein each of the plurality of execution plans includes a plurality of operations to be performed in executing the query and a schedule in which to perform operations in the plurality of operations; for each of the plurality of execution plans; determining a power consumption value for the execution plan, wherein the power consumption value approximates an amount of power that would be consumed by executing the query using the respective execution plan; and determining a monetary cost for executing the query according to the execution plan, based on one or more pricing values and the determined power consumption value for the execution plan; selecting a first execution plan from the plurality of execution plans to use in executing the query, based on the determined monetary cost for the first execution plan; and executing the query according to the first execution plan, wherein an entirety of the query is executed once the first execution plan is completed. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer-readable storage medium containing a program which, when executed, performs an operation, comprising:
-
determining a plurality of execution plans for executing a query, wherein each of the plurality of execution plans represents an alternative way of executing the query relative to the other execution plans in the plurality of execution plans, and wherein each of the plurality of execution plans includes a plurality of operations to be performed in executing the query and a schedule in which to perform operations in the plurality of operations; for each of the plurality of execution plans; determining a power consumption value for the execution plan, wherein the power consumption value approximates an amount of power that would be consumed by executing the query using the respective execution plan; and determining a monetary cost for executing the query according to the execution plan, based on one or more pricing values and the determined power consumption value for the execution plan; selecting a first execution plan from the plurality of execution plans to use in executing the query, wherein the first execution plan is selected based on the determined monetary cost for the first execution plan; and executing the query according to the first execution plan, wherein an entirety of the query is executed once the first execution plan is completed. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A system, comprising:
-
a computer processor; and a memory containing a program that, when executed on the computer processor, performs an operation for optimizing a query, comprising; determining a plurality of execution plans for executing a query, wherein each of the plurality of execution plans represents an alternative way of executing the query relative to the other execution plans in the plurality of execution plans, and wherein each of the plurality of execution plans includes a plurality of operations to be performed in executing the query and a schedule in which to perform operations in the plurality of operations; for each of the plurality of execution plans; determining a power consumption value for the execution plan, wherein the power consumption value approximates an amount of power that would be consumed by executing the query using the respective execution plan; and determining a monetary cost for executing the query according to the execution plan, based on one or more pricing values and the determined power consumption value for the execution plan; selecting a first execution plan from the plurality of execution plans to use in executing the query, wherein the first execution plan is selected based on the determined monetary cost for the first execution plan; and executing the query according to the first execution plan, wherein an entirety of the query is executed once the first execution plan is completed. - View Dependent Claims (14, 15, 16, 17, 18)
-
Specification