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 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, and 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, and wherein each queued query is received during a specified time period, 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.