1. A method for scheduling query execution, the method comprising: receiving, by a computer system, a query to be executed; assigning, by the computer system, a priority to the query; dividing, by the computer system, the query into a plurality of sub-queries; assigning, by the computer system, a sub-priority to each sub-query in the plurality of sub-queries, the sub-priority being based on a resource consumption metric of the query; selecting, by the computer system from a plurality of sub-query pools, a sub-query pool that includes sub-queries of queries that have the same priority as the query; and adding, by the computer system, the plurality of sub-queries to the selected sub-query pool.