Query governor across queries
AssigneeInternational Business Machines Corporation
InventorsEric L. BARSNESS, Daniel E. BEUCH, Alexander COOK, Brian R. MURAS, John M. SANTOSUOSSO
Life of this patent
Estimating the term…
Abstract
Techniques are described for managing the execution of one or more groups of queries. Embodiments of the present disclosure may generally receive a group of queries to be executed against a database. Embodiments also determine, based on one or more attributes of the group of queries, an expected amount of resources that will be used in executing the group of queries against the database. Embodiments further schedule one or more queries of the group of queries for execution against the database based on the expected amount of resources to be used for the group of queries.
Claims19
A computer-implemented method, comprising:
- receiving a group of multiple queries to be executed against a database;
- determining, based on one or more attributes of each query in the group of multiple queries, an expected amount of resources that will be used in executing the group of multiple queries against the database;
- scheduling the group of multiple queries for execution against the database based on the expected amount of resources to be used for the group of multiple queries, wherein scheduling the group of multiple queries comprises determining a first access plan for executing the group of multiple queries against the database based on the expected amount of resources;
- and
- after scheduling the group of multiple queries;
- executing a first plurality of queries of the group of multiple queries against the database according to the first access plan;
- determining an amount of resources used in executing the first plurality of queries against the database;
- rescheduling a remaining second plurality of queries of the group of multiple queries based on the determined amount of resources used for the first plurality of queries, wherein rescheduling the remaining second plurality of queries comprises determining a second access plan, different from the first access plan, to use for executing the remaining second plurality of queries of the group of multiple queries against the database;
- and
- executing the remaining second plurality of queries of the group of multiple queries against the database according to the second access plan.
2-3. (canceled)
(canceled)
A system, comprising:
- a computer processor;
- and
- a memory containing a program that, when executed on the computer processor, performs an operation, comprising:
- receiving a group of multiple queries to be executed against a database;
- determining, based on one or more attributes of each query in the group of multiple queries, an expected amount of resources that will be used in executing the group of multiple queries against the database;
- scheduling the group of multiple queries for execution against the database based on the expected amount of resources to be used for the group of multiple queries, wherein scheduling the group of multiple queries comprises determining a first access plan for executing the group of multiple queries against the database based on the expected amount of resources;
- and
- after scheduling the group of multiple queries:
- executing a first plurality of queries of the group of multiple queries against the database according to the first access plan;
- determining an amount of resources used in executing the first plurality of queries against the database;
- rescheduling a remaining second plurality of queries of the group of multiple queries based on the determined amount of resources used for the first plurality of queries, wherein rescheduling the remaining second plurality of queries comprises determining a second access plan, different from the first access plan, to use for executing the remaining second plurality of queries of the group of multiple queries against the database;
- and
- executing the remaining second plurality of queries of the group of multiple queries against the database according to the second access plan.
(canceled)
A computer program product, comprising:
- a non-transitory computer-readable storage medium having computer readable program code embodied therewith, the computer readable program code comprising:
- computer readable program code to receive a group of multiple queries to be executed against a database;
- computer readable program code to determine, based on one or more attributes of each query the group of multiple queries, an expected amount of resources that will be used in executing the group of multiple queries against the database;
- computer readable program code to schedule the group of multiple queries for execution against the database based on the expected amount of resources to be used for the group of multiple queries, wherein the computer readable program code to schedule the group of multiple queries comprises computer readable program code to determine a first access plan for executing the group of multiple queries against the database based on the expected amount of resources;
- and
- computer readable program code to, after scheduling the group of multiple queries:
- execute a first plurality of queries of the group of multiple queries against the database according to the first access plan;
- determine an amount of resources used in executing the first plurality of queries against the database;
- reschedule a remaining second plurality of queries of the group of multiple queries based on the determined amount of resources used for the first plurality of queries, wherein the computer readable program code to reschedule the remaining second plurality of queries comprises computer readable program code to determine a second access plan, different from the first access plan, to use for executing the remaining second plurality of queries of the group of multiple queries against the database;
- and
- execute the remaining second plurality of queries of the group of multiple queries against the database according to the second access plan.
Dependencies are inferred from the claim text.