Adjusting an amount of data logged for a query based on a change to an access plan
First Claim
1. A method comprising:
- determining whether data needs to be logged for a query, wherein the query is performed based on an access plan; and
adjusting an amount of the data saved to a log based on whether the access plan for the query has been changed within a threshold amount of time if the determining is true.
3 Assignments
0 Petitions
Accused Products
Abstract
A method, apparatus, system, and signal-bearing medium that, in an embodiment, save a problem record associated with a query to a log if the query encountered a problem. The amount of data in the record is increased if an access plan associated with the query has changed within a threshold amount of time and decreased if the access plan has not changed. In various embodiments, the problem may be that the query executes longer than a historical average for the query, the query executes longer than a threshold, or the query encounters a functional error. In an embodiment, a benchmark record associated with the query is also saved to the log, the problem record is compared to the benchmark record, and the difference is presented. In various embodiments, an oldest record is periodically removed from the log, or an oldest record is removed from the log if the associated query has more than a threshold number of records in the log. In this way, the amount of data in the log may be reduced and determining the source of query performance problems may be more easily determined.
90 Citations
20 Claims
-
1. A method comprising:
-
determining whether data needs to be logged for a query, wherein the query is performed based on an access plan; and
adjusting an amount of the data saved to a log based on whether the access plan for the query has been changed within a threshold amount of time if the determining is true. - View Dependent Claims (2, 3, 4)
-
-
5. An apparatus comprising:
-
means for determining whether a problem record needs to be saved to a log for a query, wherein the query is performed based on an access plan; and
means for adjusting an amount of the data saved to the problem record in the log based on whether the access plan for the query has been changed within a threshold amount of time if the means for determining is true; and
means for saving a benchmark record for the query in the log. - View Dependent Claims (6, 7, 8)
-
-
9. A signal-bearing medium encoded with instructions, wherein the instructions when executed comprise:
-
saving a benchmark record associated with a query to a log if benchmarking is enabled;
saving a problem record associated with the query to the log if benchmarking is not enabled and the query encountered a problem; and
comparing the benchmark record to the problem record. - View Dependent Claims (10, 11, 12)
-
-
13. A computer system comprising:
-
a processor; and
a storage device encoded with instructions, wherein the instructions when executed on the processor comprise;
saving a benchmark record associated with a query to a log if benchmarking is enabled, saving a problem record associated with the query to the log if benchmarking is not enabled and the query encountered a problem, wherein the saving further comprises adjusting an amount of data in the problem record based on whether an access plan for the query has changed within a threshold amount of time, and comparing the benchmark record to the problem record. - View Dependent Claims (14, 15, 16)
-
-
17. A method for configuring a computer, comprising:
-
configuring the computer to determine whether data needs to be logged for a query, wherein the query is performed based on an access plan; and
configuring the computer to adjust an amount of the data saved to a log based on whether the access plan for the query has been changed within a threshold amount of time if the determining is true. - View Dependent Claims (18, 19, 20)
-
Specification