US 12,292,886 B2
Estimating query execution performance using a sampled counter
John Mark Beresniewicz, Half Moon Bay, CA (US); and Kusumaharanadh Poduri, Mountain House, CA (US)
Assigned to Oracle International Corporation, Redwood Shores, CA (US)
Filed by Oracle International Corporation, Redwood Shores, CA (US)
Filed on Jan. 20, 2022, as Appl. No. 17/580,071.
Prior Publication US 2023/0229659 A1, Jul. 20, 2023
Int. Cl. G06F 16/245 (2019.01); G06F 11/30 (2006.01); G06F 11/34 (2006.01); G06F 16/2453 (2019.01)
CPC G06F 16/24542 (2019.01) [G06F 11/3075 (2013.01); G06F 11/3419 (2013.01)] 20 Claims
OG exemplary drawing
 
1. A method comprising:
probabilistically monitoring database activity by generating sample data for a set of one or more active database sessions at sample intervals, wherein the sample data is generated for a fraction of total database queries that are executed within a sample interval and are part of the database activity;
identifying, in the sample data, a set of active database queries and sample counter values associated with the set of active database queries at different sample interval times, wherein the sample counter values include a first sample counter value that tracks executions of an individual database query at a first sample time and a second sample counter value that tracks executions of the individual database query at a second sample time;
estimating, based at least on the sample counter values associated with the set of active database queries at the different sample interval times, one or more performance metrics for the set of active database queries, wherein estimating the one or more performance metrics for the set of active database queries includes computing a probabilistic performance metric for the individual database query using at least the first sample counter value and the second sample counter value, wherein the probabilistic performance metric is at least one of an estimated execution frequency or latency of the individual database query computed as a function of the first sample counter value and the second sample counter value; and
generating, based at least in part on the one or more performance metrics for the set of active database queries, an alert indicative of performance degradation associated with at least one active database query in the set of active database queries.