IP Library › Granted Patent US 10,049,133
Granted Patent B2
US 10,049,133 · App. 15/336,447 · Granted Aug 14, 2018

Query governor across queries

Inventors: Eric L. Barsness (Pine Island, MN); Daniel E. Beuch (Rochester, MN); Alexander Cook (Rochester, MN); Brian R. Muras (Otsego, MN); John M. Santosuosso (Rochester, MN)
Assignee: INTERNATIONAL BUSINESS MACHINES CORPORATION
G06F17/3046G06F17/30469G06F17/30477
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 10,049,133
App. No.
15/336,447
Granted
Aug 14, 2018
Kind
B2
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.

Claims (45)

1. 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. The computer-implemented method of claim 1 , wherein rescheduling the remaining second plurality of queries further comprises delaying the execution of the remaining second plurality of queries of the group of queries against the database.

3. The computer-implemented method of claim 2 , wherein delaying the execution of the remaining second plurality of queries comprises delaying a set of queries in a first thread to increase an amount of resources available for executing a set of queries in a second thread against the database.

4. The computer-implemented method of claim 1 , wherein rescheduling the remaining second plurality of queries further comprises adjusting an amount of resources available for executing the remaining second plurality of queries.

5. The computer-implemented method of claim 1 , wherein the expected amount of resources comprises at least one of an expected execution time, an expected amount of memory, and an expected load on one or more processors.

6. The computer-implemented method of claim 1 , wherein the group of multiple queries comprises a plurality of queries of a same query type.

7. The computer-implemented method of claim 1 , wherein the group of multiple queries comprises at least one of a group of queries received in sequence from a single processing thread, and a group of queries received in parallel from multiple processing threads.

8. The computer-implemented method of claim 1 , wherein the group of multiple queries comprises a plurality of queries associated with at least one of a user, an application, and one or more operations.

9. The computer-implemented method of claim 1 , wherein the group of multiple queries comprises a plurality of queries previously executed against the database.

10. 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.

11. The system of claim 10 , wherein rescheduling the remaining second plurality of queries further comprises:

delaying the execution of the remaining second plurality of queries of the group of multiple queries against the database.

12. The system of claim 11 , wherein delaying the execution of the remaining second plurality of queries comprises delaying a set of queries in a first thread to increase an amount of resources available for executing a set of queries in a second thread against the database.

13. The system of claim 10 , wherein rescheduling the remaining second plurality of queries further comprises adjusting an amount of resources available for executing the remaining second plurality of queries against the database.

14. The system of claim 10 , wherein the expected amount of resources comprises at least one of an expected execution time, an expected amount of memory, and expected load on one or more processors, and wherein the group of multiple queries comprises a plurality of queries of a same query type, a plurality of queries associated with at least one of a user, an application, and one or more operations, or a plurality of queries previously executed against the database.

15. 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.

16. The computer program product of claim 15 , wherein the computer readable program code to reschedule the remaining second plurality of queries further comprises:

computer readable program code to delay the execution of the remaining second plurality of queries of the group of multiple queries against the database.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 27, 2016
From: BARSNESS, ERIC L.; BEUCH, DANIEL E.; COOK, ALEXANDER; MURAS, BRIAN R.; SANTOSUOSSO, JOHN M.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 040154/0654 →
Continuity (1)
Related Publication 20180121426A1 · May 3, 2018
Cited By (1)
US 12,639,308