IP Library Granted Patent US 8,290,937
Granted Patent B2
US 8,290,937 · App. 12/871,102 · Granted Oct 16, 2012

Estimating and monitoring query processing time

Assignee: International Business Machines Corporation
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 8,290,937
App. No.
12/871,102
Granted
Oct 16, 2012
Kind
B2
Abstract

Techniques are described for managing query execution by estimating and monitoring query execution time. Embodiments of the invention may generally receive a query to be executed and calculate an initial estimated execution time for the received query. If the initial estimated execution time does not exceed a threshold amount of time, embodiments of the invention may submit the query for execution. Once execution of the query has begun, embodiments of the invention may calculate an updated estimated execution time for the executing query, and if the updated estimated execution time exceeds the threshold amount of time, may halt the execution of the query.

Claims (40)

1. A method of managing the execution of a query, comprising:

receiving a query to be executed;

determining a plurality of operations involved in executing the received query;

calculating an initial execution time for the received query, based on a calculated estimated execution time for each of the determined plurality of operations;

upon determining the calculated initial execution time does not exceed a first threshold amount of time, executing the query by operation of one or more computer processors;

calculating an updated execution time for the received query while the query is executing; and

halting the execution of the query upon determining that the updated execution time exceeds a second threshold amount of time.

2. The method of claim 1 , wherein calculating an updated execution time for the received query is further based on historical data collected from previously executed queries.

3. The method of claim 1 , wherein the query is received from a user, and further comprising:

upon halting the execution of the query, returning a message to the user indicating that execution of the query was halted.

4. The method of claim 1 , wherein calculating the updated execution time is further based on one or more values in the received query.

5. The method of claim 1 , further comprising collecting metadata describing the received query, wherein calculating the updated execution time is further based on the collected metadata describing the received query.

6. The method of claim 1 , wherein the threshold amount of time is based on at least one of (i) a predetermined threshold value, (ii) an origin of the received query, and (iii) a priority value associated with the received query.

7. The method of claim 1 , further comprising resuming the execution of the halted query.

8. The method of claim 1 , further comprising recalculating the initial execution time for the received query, wherein the query is executed only upon determining that the recalculated initial execution time does not exceed a first threshold amount of time.

9. A system, comprising:

a computer processor; and

a memory containing a program that, when executed on the computer processor, performs an operation for managing the execution of a query, comprising:

receiving a query to be executed;

determining a plurality of operations involved in executing the received query;

calculating an initial execution time for the received query, based on a calculated estimated execution time for each of the determined plurality of operations;

upon determining the calculated initial execution time does not exceed a first threshold amount of time, executing the query;

calculating an updated execution time for the received query while the query is executing; and

halting the execution of the query upon determining that the updated execution time exceeds a second threshold amount of time.

10. The system of claim 9 , wherein calculating an updated execution time for the received query is further based on historical data collected from previously executed queries.

11. The system of claim 9 , wherein the query is received from a user, and further comprising:

upon halting the execution of the query, returning a message to the user indicating that execution of the query was halted.

12. The system of claim 9 , wherein calculating the updated execution time is further based on one or more values in the received query.

13. The system of claim 9 , the operation further comprising collecting metadata describing the received query, wherein calculating the updated execution time is further based on the collected metadata describing the received query.

14. The system of claim 9 , wherein the threshold amount of time is based on at least one of (i) a predetermined threshold value, (ii) an origin of the received query, and (iii) a priority value associated with the received query.

15. The system of claim 9 , the operation further comprising resuming the execution of the halted query.

16. The system of claim 9 , the operation further comprising recalculating the initial execution time for the received query, and wherein the query is executed only upon determining that the recalculated initial execution time does not exceed a first threshold amount of time.

17. A computer program product for managing the execution of a query, comprising:

a computer-readable storage medium having computer readable program code embodied therewith, the computer readable program code comprising:

computer readable program code to receive a query to be executed;

computer readable program code to determine a plurality of operations involved in executing the received query;

computer readable program code to calculate an initial execution time for the received query, based on a calculated estimated execution time for each of the determined plurality of operations;

computer readable program code to, upon determining the calculated initial execution time does not exceed a first threshold amount of time, execute the query;

computer readable program code to calculate an updated execution time for the received query while the query is executing; and

computer readable program code to halt the execution of the query upon determining that the updated execution time exceeds a second threshold amount of time.

Assignments (3)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Feb 19, 2021
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 055339/0415 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 5, 2020
From: INTERNATIONAL BUSINESS MACHINES CORPORATION
To: ALIBABA GROUP HOLDING LIMITED
Reel/Frame 053970/0339 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 30, 2010
From: BARSNESS, ERIC L.; SANTOSUOSSO, JOHN M.
To: INTERNATIONAL BUSINESS MACHINES CORPORATION
Reel/Frame 024905/0706 →
Continuity (1)
Related Publication 20120054175A1 · Mar 1, 2012