Aggregating database queries
First Claim
1. A computer-implemented method, comprising:
- receiving a database query;
determining at least one data element required for executing the database query;
identifying, from a plurality of storage devices, a storage device storing the determined at least one data element;
adding the received database query to a first queue of a plurality of queues each having a plurality of queued queries, each of the queues having a predefined association with a respective storage device of the plurality of storage devices, wherein the predefined association of the first queue is a first predefined association with the identified storage device storing the determined at least one data element, wherein each of the queued queries of a given of one of the queues requires one or more data elements stored in the respective storage device in order to be executed, wherein each queued query is received during a specified time period, and wherein the specified time period is selected according to an energy consumption objective; and
after the specified time period;
dispatching the plurality of queued queries from the first queue;
retrieving, from the respective storage device, data elements required for executing the dispatched queries; and
executing the dispatched queries, using the retrieved data elements as inputs.
1 Assignment
0 Petitions
Accused Products
Abstract
Embodiments of the invention provide techniques for aggregating database queries for energy efficiency. In one embodiment, queries received by a DBMS are aggregated and staged according to hard-disk drives required for query execution. Each group of queries accessing a given drive may be dispatched for execution together. Further, the queries received by a DBMS may be matched to patterns of previously received queries. The matching patterns may be used to predict other queries which are likely to be received by the DBMS. The received queries may be staged to be dispatched with the predicted queries. By aggregating queries to be executed, access to each hard-disk drive may be optimized, thus reducing the overall energy consumption required for executing the queries.
-
Citations
20 Claims
-
1. A computer-implemented method, comprising:
-
receiving a database query; determining at least one data element required for executing the database query; identifying, from a plurality of storage devices, a storage device storing the determined at least one data element; adding the received database query to a first queue of a plurality of queues each having a plurality of queued queries, each of the queues having a predefined association with a respective storage device of the plurality of storage devices, wherein the predefined association of the first queue is a first predefined association with the identified storage device storing the determined at least one data element, wherein each of the queued queries of a given of one of the queues requires one or more data elements stored in the respective storage device in order to be executed, wherein each queued query is received during a specified time period, and wherein the specified time period is selected according to an energy consumption objective; and after the specified time period; dispatching the plurality of queued queries from the first queue; retrieving, from the respective storage device, data elements required for executing the dispatched queries; and executing the dispatched queries, using the retrieved data elements as inputs. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer readable storage medium containing a program which, when executed, performs an operation, comprising:
-
receiving a database query; determining at least one data element required for executing the database query; identifying, from a plurality of storage devices, a storage device storing the determined at least one data element; adding the received database query to a first queue of a plurality of queues each having a plurality of queued queries, each of the queues having a predefined association with a respective storage device of the plurality of storage devices, wherein the predefined association of the first queue is a first predefined association with the identified storage device storing the determined at least one data element, wherein each of the queued queries of a given of one of the queues requires one or more data elements stored in the respective storage device in order to be executed, wherein each queued query is received during a specified time period, and wherein the specified time period is selected according to an energy consumption objective; and after the specified time period; dispatching the plurality of queued queries from the first queue; retrieving, from the respective storage device, data elements required for executing the dispatched queries; and executing the dispatched queries, using the retrieved data elements as inputs. - View Dependent Claims (10, 11, 12, 13, 14, 15, 16)
-
-
17. 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; determining at least one data element required for executing the database query; identifying, from a plurality of storage devices, a storage device storing the determined at least one data element; adding the received database query to a first queue of a plurality of queues each having a plurality of queued queries, each of the queues having a predefined association with a respective storage device of the plurality of storage devices, wherein the predefined association of the first queue is a first predefined association with the identified storage device storing the determined at least one data element, wherein each of the queued queries of a given of one of the queues requires one or more data elements stored in the respective storage device in order to be executed, wherein each queued query is received during a specified time period, and wherein the specified time period is selected according to an energy consumption objective; and after the specified time period; dispatching the plurality of queued queries from the first queue; retrieving, from the respective storage device, data elements required for executing the dispatched queries; and executing the dispatched queries, using the retrieved data elements as inputs. - View Dependent Claims (18, 19, 20)
-
Specification