IP Library Granted Patent US 7,325,016
Granted Patent B1
US 7,325,016 · App. 11/129,109 · Granted Jan 29, 2008

Monitoring database performance by obtaining SQL addresses for SQL statements

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 7,325,016
App. No.
11/129,109
Granted
Jan 29, 2008
Kind
B1
Abstract

The present invention provides a method and system for monitoring the process performance of a database that accepts and records SQL statements and that records the status of a session of use of the database. The invention obtains the SQL address and hash value for each SQL statement, the current session status corresponding to each SQL statement and the previous session status corresponding to each SQL statement. The invention also records a time stamp at the time the session status information is obtained. The information gathering steps are repeated at a predetermined interval of time. Using the information gathered, the run time for each SQL statement is calculated. The run time for each SQL statement may then be reviewed to determine which SQL statements experience the greatest run time, which allows DBAs to locate the source of any performance problems.

Claims (40)

1. A machine-implemented method for obtaining process performance data related to a database, the method comprising:

periodically obtaining and storing an SQL address and unique identifier for each of a plurality of SQL statements, wherein said unique identifier includes a hash value;

determining whether each of said plurality of SQL statements is new to a database session based on whether the address and unique identifier of each SQL statement were stored at an immediately previous time period;

calculating and storing a run time for each SQL statement,

wherein the run time for each SQL statement is presented to the user to evaluate run times associated with at least a portion of the one or more SQL statements.

2. The method of claim 1 , wherein calculating a run time for each SQL statement comprises:

obtaining and storing a current status of a session corresponding to each SQL statement;

storing a time stamp at the time the current status of the session is obtained;

repeating the obtaining steps and the time-stamp storing step periodically; and

calculating a run time for each SQL statement based upon the obtained SQL address and unique identifier, the time stamp, the time stamp from the immediately previous time period, and the current status of the session.

3. The method of claim 2 , wherein the calculating step further comprises:

for each of a plurality of SQL statements, if an SQL statement is new to a database session, determining whether the current status of the session is active and, if so, adding a fractional portion of the immediately previous time period to the run time for the SQL statement.

4. One or more computer-readable media having computer-useable instructions embodied thereon to perform the method of claim 1 .

5. One or more computer-readable media having computer-useable instructions embodied thereon to perform the method of claim 2 .

6. A computer-program product comprising computer-useable instructions embodied in one or more computer-readable media for performing a method evaluating the performance of a database, said computer program product comprising:

code for accepting and storing a plurality of SQL statements into said database;

code for storing the current status of a session of use of the database;

code for obtaining and storing an SQL address and unique identifier associated with said plurality of SQL statements, wherein said unique identifier includes a hash value;

code for determining whether each of said plurality of SQL statements is new to a database session based on whether the address and unique identifier of each SQL statement were stored at an immediately previous time period; and

code for calculating and storing a run time for each SQL statement, wherein the run time for each SQL statement may be presented to evaluate run times associated with at least a portion of the one or more of said plurality of SQL statements.

7. The product of claim 6 , wherein said code for calculating and storing said run time for each SQL statement comprises:

code for obtaining and storing the current status of the session corresponding to each SQL statement;

code for storing a time stamp at the time the session status is obtained;

code for repeating the obtaining steps and the time stamp storing step periodically; and

code for calculating and storing a run time for each SQL statement based upon the obtained SQL address and unique identifier, the time stamp and the current status of the session.

8. The product of claim 7 , wherein code for calculating and storing said run time further comprises:

code for determining whether an SQL statement is new to the database session; and if so,

further code for determining whether the current status of the session is active, applying an addition to the run time for the SQL statement if the current status of the session is active, and storing the run time.

9. The product of claim 8 , where the addition to the run time is a portion of the immediately previous time period.

10. The product of claim 9 , where the portion is one-quarter of the immediately previous time period.

11. The product of claim 6 , wherein the code for calculating said run time further comprises:

obtaining a previous status of a session corresponding to each SQL statement, the previous status being the former current status which was stored at the previous time period;

if an SQL statement is not new to a database session, determining the previous status of the session for the SQL statement and the current status of the session for the SQL statement; and

applying a first addition to the run time for the SQL statement if the previous status of the session is active, and storing the run time.

12. The product of claim 11 , further comprising code for applying a second addition to the run time for the SQL statement if the previous status of the session is inactive and the current status of the session is active, and storing the run time.

13. The product of claim 12 , wherein the second addition to the run time, if the previous status of the session is inactive and the current status of the session is active, is a portion of the time period.

14. The product of claim 11 , wherein the first addition to the run time, if the previous status of the session is active and the current status of the session is active, is the full amount of the time period.

15. The product of claim 11 , wherein the first addition to the run time, if the previous status of the session is active and the current status of the session is inactive, is a portion of the time period.

16. The product of claim 6 , further comprising code for presenting to the user a report containing a listing of each SQL statement and the run time corresponding to each SQL statement.

17. The product of claim 16 , where the report contains the SQL address and unique identifier.

Assignments (4)
RELEASE OF SECURITY INTEREST Recorded Aug 23, 2022
From: DEUTSCHE BANK TRUST COMPANY AMERICAS
To: SPRINT INTERNATIONAL INCORPORATED; IBSV LLC; LAYER3 TV, LLC; PUSHSPRING, LLC; T-MOBILE CENTRAL LLC; T-MOBILE USA, INC.; ASSURANCE WIRELESS USA, L.P.; BOOST WORLDWIDE, LLC; CLEARWIRE COMMUNICATIONS LLC; CLEARWIRE IP HOLDINGS LLC; SPRINTCOM LLC; SPRINT COMMUNICATIONS COMPANY L.P.; SPRINT SPECTRUM LLC
Reel/Frame 062595/0001 →
TERMINATION AND RELEASE OF FIRST PRIORITY AND JUNIOR PRIORITY SECURITY INTEREST IN PATENT RIGHTS Recorded Apr 2, 2020
From: DEUTSCHE BANK TRUST COMPANY AMERICAS
To: SPRINT COMMUNICATIONS COMPANY L.P.
Reel/Frame 052969/0475 →
SECURITY AGREEMENT Recorded Apr 2, 2020
From: T-MOBILE USA, INC.; ISBV LLC; T-MOBILE CENTRAL LLC; LAYER3 TV, INC.; PUSHSPRING, INC.; BOOST WORLDWIDE, LLC; CLEARWIRE COMMUNICATIONS LLC; CLEARWIRE IP HOLDINGS LLC; CLEARWIRE LEGACY LLC; SPRINT COMMUNICATIONS COMPANY L.P.; SPRINT INTERNATIONAL INCORPORATED; SPRINT SPECTRUM L.P.; ASSURANCE WIRELESS USA, L.P.
To: DEUTSCHE BANK TRUST COMPANY AMERICAS
Reel/Frame 053182/0001 →
GRANT OF FIRST PRIORITY AND JUNIOR PRIORITY SECURITY INTEREST IN PATENT RIGHTS Recorded Mar 6, 2017
From: SPRINT COMMUNICATIONS COMPANY L.P.
To: DEUTSCHE BANK TRUST COMPANY AMERICAS
Reel/Frame 041895/0210 →