IP Library Granted Patent US 7,941,426
Granted Patent B2
US 7,941,426 · App. 12/117,037 · Granted May 10, 2011

Optimizing database queries

Assignee: International Business Machines Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,941,426
App. No.
12/117,037
Granted
May 10, 2011
Kind
B2
Abstract

Techniques for optimizing database queries for energy efficiency. A query optimizer is configured to compare energy requirements of query plans, and to select a query plan requiring minimal energy to execute. The query optimizer may also compare time performance of the query plans, and may select a query plan by matching to a user preference for a relative priority between energy requirements and time performance.

Claims (59)

1. A computer-implemented method, comprising:

receiving a database query;

generating, by operation of one or more computer processors, a plurality of query plans for executing the database query;

estimating one or more characteristics of energy consumption for executing each query plan;

estimating one or more characteristics of time for executing each query plan; and

selecting one of the plurality of query plans for executing the database query, based at least on (i) the one or more characteristics of energy consumption, (ii) the one or more characteristics of time, and (iii) a relative priority between the characteristics of energy consumption and the characteristics of time.

2. The computer-implemented method of claim 1 , further comprising:

executing the selected query plan; and

returning a set of query results.

3. The computer-implemented method of claim 1 , wherein estimating the one or more characteristics of energy consumption is based on predefined standards of energy consumption for computer components.

4. The computer-implemented method of claim 1 , wherein the one or more characteristics of energy consumption comprise the electrical energy required to spin one or more hard-disk drives required to execute each query plan.

5. The computer-implemented method of claim 1 , wherein the one or more characteristics of energy consumption comprise the electrical energy required to cool one or more hard-disk drives required to execute each query plan.

6. The computer-implemented method of claim 1 , wherein the one or more characteristics of energy consumption comprise the electrical energy required to cool one or more processors required to execute each query plan.

7. A computer readable storage medium containing a program which, when executed, performs an operation, comprising:

receiving a database query;

generating a plurality of query plans for executing the database query;

estimating one or more characteristics of energy consumption for executing each query plan;

estimating one or more characteristics of time for executing each query plan; and

selecting one of the plurality of query plans for executing the database query, based at least on (i) the one or more characteristics of energy consumption, (ii) the one or more characteristics of time, and (iii) a relative priority between the characteristics of energy consumption and the characteristics of time.

8. The computer readable storage medium of claim 7 , the operation further comprising:

executing the selected query plan; and

returning a set of query results.

9. The computer readable storage medium of claim 7 , wherein estimating the one or more characteristics of energy consumption is based on predefined standards of energy consumption for computer components.

10. The computer readable storage medium of claim 7 , wherein the one or more characteristics of energy consumption comprise the electrical energy required to spin one or more hard-disk drives required to execute each query plan.

11. The computer readable storage medium of claim 7 , wherein the one or more characteristics of energy consumption comprise the electrical energy required to cool one or more hard-disk drives required to execute each query plan.

12. The computer readable storage medium of claim 7 , wherein the one or more characteristics of energy consumption comprise the electrical energy required to cool one or more processors required to execute each query plan.

13. A system, comprising:

a database;

a processor; and

a memory containing a program, which when executed by the processor is configured to perform an operation, comprising:

receiving a database query;

generating a plurality of query plans for executing the database query;

estimating one or more characteristics of energy consumption for executing each query plan;

estimating one or more characteristics of time for executing each query plan; and

selecting one of the plurality of query plans for executing the database query, based at least on tithe one or more characteristics of energy consumption, (ii) the one or more characteristics of time, and (iii) a relative priority between the characteristics of energy consumption and the characteristics of time.

14. The system of claim 13 , the operation further comprising:

executing the selected query plan; and

returning a set of query results.

15. The system of claim 13 , wherein the one or more characteristics of energy consumption comprise the electrical energy required to spin one or more hard-disk drives required to execute each query plan.

16. The system of claim 13 , wherein the one or more characteristics of energy consumption comprise at least one of (i) the electrical energy required to cool one or more hard-disk drives required to execute each query plan and (ii) the electrical energy required to cool one or more processors required to execute each query plan.

17. A computer-implemented method, comprising:

receiving a database query;

generating, by operation of one or more computer processors, a plurality of query plans for executing the database query;

estimating one or more characteristics of energy consumption for executing each query plan, wherein the one or more characteristics comprise at least one of (i) the electrical energy required to spin one or more hard-disk drives required to execute each query plan, (ii) the electrical energy required to cool one or more hard-disk drives required to execute each query plan, and (iii) the electrical energy required to cool one or more processors required to execute each query plan; and

selecting, based at least on the one or more characteristics of energy consumption, one of the plurality of query plans for executing the database query.

18. A computer program product, comprising:

a computer-readable storage medium having computer readable program code embodied therewith, the computer readable program code comprising:

computer readable program code to receive a database query;

computer readable program code to generate a plurality of query plans for executing the database query;

computer readable program code to estimate one or more characteristics of energy consumption for executing each query plan, wherein the one or more characteristics comprise at least one of (i) the electrical energy required to spin one or more hard-disk drives required to execute each query plan, (ii) the electrical energy required to cool one or more hard-disk drives required to execute each query plan, and (iii) the electrical energy required to cool one or more processors required to execute each query plan; and

computer readable program code to select, based at least on the one or more characteristics of energy consumption, one of the plurality of query plans for executing the database query.

19. A system, comprising:

a database;

a processor; and

a memory containing a program, which when executed by the processor is configured to perform an operation, comprising:

receiving a database query;

generating a plurality of query plans for executing the database query;

estimating one or more characteristics of energy consumption for executing each query plan, wherein the one or more characteristics comprise at least one of (i) the electrical energy required to spin one or more hard-disk drives required to execute each query plan, (ii) the electrical energy required to cool one or more hard-disk drives required to execute each query plan, and (iii) the electrical energy required to cool one or more processors required to execute each query plan; and

selecting, based at least on the one or more characteristics of energy consumption, one of the plurality of query plans for executing the database query.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded May 8, 2008
From: BESTGEN, ROBERT J; HU, WEI; KETHIREDDY, SHANTAN; PASSE, ANDREW P; THIEMANN, ULRICH
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 020917/0418 →
Continuity (1)
Related Publication 20090281992A1 · Nov 12, 2009