# US 2024/0004881 A1 · System And Method For Query Resource Caching

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2024/0004881 A1
- Document ID: US20240004881A1
- Status: Published application
- Kind: A1
- Application number: 18/470,034
- Filed: 2023-09-19
- Published: 2024-01-04
- Earliest claimed: 2017-05-19
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Oleksiy Ignatyev; Mihail Mihaylov
- Web page: https://patentgrep.com/patent/US20240004881A1

## CPC

- G06F 16/24552: {Database cache management}
- G06F 9/4494: {data driven}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/24539: {using cached or materialised query results}
- G06F 16/2456: {Join operations}
- G06F 16/2471: {Distributed queries}
- G06F 16/9017: {using directory or table look-up (use of a directory or look-up table in file systems G06F16/13)}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Operations include determining whether to cache resources accessed by a query based on the execution time of the query. The system identifies a set of executions of a same query. The system determines a cumulative execution time for the set of executions of the same query. If the cumulative execution time exceeds a threshold value, then the system caches a resource used for execution of the query.

## Claims

### Claim 1

One or more non-transitory computer readable media comprising instructions which, when executed by one or more hardware processors, causes performance of operations comprising:
identifying a first plurality of executions of a first query during a first period of time;
comparing an execution time of each execution, of the first plurality of executions of the first query, to a first threshold value;
identifying a first subset of executions, of the first plurality of executions, with corresponding execution times that exceed the first threshold value;
determining whether a first number of executions, in the first subset of executions, exceeds a second threshold value;
responsive to determining that the first number of executions, in the first subset of executions, exceeds the second threshold value:
caching a first resource, used for execution of the first query, for a second period of time.

### Claim 2 (depends on 1)

The one or more non-transitory computer readable media of claim 1, wherein the operations further comprise:
identifying a second plurality of executions of a second query during the first period of time;
comparing an execution time of each execution, of the second plurality of executions of the second query, to a first threshold value;
identifying a second subset of executions, of the second plurality of executions, with corresponding execution times that exceed the first threshold value;
determining whether a second number of executions, in the second subset of executions, exceeds a second threshold value;
responsive at least to determining that the second number of executions, in the second subset of executions, does not exceed the second threshold value:
refraining from caching a second resource, used for execution of the second query, for the second period of time.

### Claim 3 (depends on 1)

The non-transitory computer readable media of claim 1, wherein the resource is a table.

### Claim 4 (depends on 1)

The non-transitory computer readable media of claim 1, wherein determining the execution time for a particular execution of the first plurality of executions of the first query comprises:
determining a time period between transmitting a request to execute the first query and receiving results from execution of the first query.

### Claim 5 (depends on 1)

The non-transitory computer readable media of claim 1, wherein a particular execution, of the first plurality of executions, is determined to be computationally expensive responsive to the execution time of the particular execution exceed the first threshold value.

### Claim 6 (depends on 1)

The non-transitory computer readable media of claim 1, wherein the operations further comprise storing a log record for the first subset of executions with corresponding execution times that exceed the first threshold value.

### Claim 7 (depends on 1)

The non-transitory computer readable media of claim 1, wherein first resource is stored further in response to determining that a cumulative execution time for the first subset of executions exceeds a third threshold value.

### Claim 8

A method including operations comprising:
identifying a first plurality of executions of a first query during a first period of time;
comparing an execution time of each execution, of the first plurality of executions of the first query, to a first threshold value;
identifying a first subset of executions, of the first plurality of executions, with corresponding execution times that exceed the first threshold value;
determining whether a first number of executions, in the first subset of executions, exceeds a second threshold value;
responsive to determining that the first number of executions, in the first subset of executions, exceeds the second threshold value:
caching a first resource, used for execution of the first query, for a second period of time,
wherein the method is executed by at least one device including a hardware processor.

### Claim 9 (depends on 8)

The method of claim 8, wherein the operations further comprise:
identifying a second plurality of executions of a second query during the first period of time;
comparing an execution time of each execution, of the second plurality of executions of the second query, to a first threshold value;
identifying a second subset of executions, of the second plurality of executions, with corresponding execution times that exceed the first threshold value;
determining whether a second number of executions, in the second subset of executions, exceeds a second threshold value;
responsive at least to determining that the second number of executions, in the second subset of executions, does not exceed the second threshold value:
refraining from caching a second resource, used for execution of the second query, for the second period of time.

### Claim 10 (depends on 8)

The method of claim 8, wherein the resource is a table.

### Claim 11 (depends on 8)

The method of claim 8, wherein determining the execution time for a particular execution of the first plurality of executions of the first query comprises:
determining a time period between transmitting a request to execute the first query and receiving results from execution of the first query.

### Claim 12 (depends on 8)

The method of claim 8, wherein a particular execution, of the first plurality of executions, is determined to be computationally expensive responsive to the execution time of the particular execution exceed the first threshold value.

### Claim 13 (depends on 8)

The method of claim 8, wherein the operations further comprise storing a log record for the first subset of executions with corresponding execution times that exceed the first threshold value.

### Claim 14 (depends on 8)

The method of claim 8, wherein first resource is stored further in response to determining that a cumulative execution time for the first subset of executions exceeds a third threshold value.

### Claim 15

A system comprising:
at least one device including a hardware processor;
the system being configured to perform operations comprising:
identifying a first plurality of executions of a first query during a first period of time;
comparing an execution time of each execution, of the first plurality of executions of the first query, to a first threshold value;
identifying a first subset of executions, of the first plurality of executions, with corresponding execution times that exceed the first threshold value;
determining whether a first number of executions, in the first subset of executions, exceeds a second threshold value;
responsive to determining that the first number of executions, in the first subset of executions, exceeds the second threshold value:
caching a first resource, used for execution of the first query, for a second period of time.

### Claim 16 (depends on 15)

The system of claim 15, wherein the operations further comprise:
identifying a second plurality of executions of a second query during the first period of time;
comparing an execution time of each execution, of the second plurality of executions of the second query, to a first threshold value;
identifying a second subset of executions, of the second plurality of executions, with corresponding execution times that exceed the first threshold value;
determining whether a second number of executions, in the second subset of executions, exceeds a second threshold value;
responsive at least to determining that the second number of executions, in the second subset of executions, does not exceed the second threshold value:
refraining from caching a second resource, used for execution of the second query, for the second period of time.

### Claim 17 (depends on 15)

The system of claim 15, wherein the resource is a table.

### Claim 18 (depends on 15)

The system of claim 15, wherein determining the execution time for a particular execution of the first plurality of executions of the first query comprises:
determining a time period between transmitting a request to execute the first query and receiving results from execution of the first query.

### Claim 19 (depends on 15)

The system of claim 15, wherein a particular execution, of the first plurality of executions, is determined to be computationally expensive responsive to the execution time of the particular execution exceed the first threshold value.

### Claim 20 (depends on 15)

The system of claim 15, wherein the operations further comprise storing a log record for the first subset of executions with corresponding execution times that exceed the first threshold value.

### Claim 21 (depends on 15)

The system of claim 15, wherein first resource is stored further in response to determining that a cumulative execution time for the first subset of executions exceeds a third threshold value.
