# US 2021/0081434 A1 · Autonomous caching for views

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

- Number: US 2021/0081434 A1
- Document ID: US20210081434A1
- Status: Published application
- Kind: A1
- Application number: 16/824,541
- Filed: 2020-03-19
- Published: 2021-03-18
- Earliest claimed: 2019-09-12
- Assignees: Oracle International Corporation
- Applicants: Oracle International Corporation
- Inventors: Matthew Dombroski; Anne Murphy; Ekrem S.C. Soylemez; James Hartsing
- Web page: https://patentgrep.com/patent/US20210081434A1

## CPC

- G06F 16/24539: {using cached or materialised query results}
- G06F 16/275: {Synchronous replication}
- G06F 16/254: {Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses}
- G06F 16/282: {Hierarchical databases, e.g. IMS, LDAP data stores or Lotus Notes}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques are provided for autonomous caching of hierarchical data. In one technique, query log data is stored that comprises multiple entries, each entry (a) corresponding to a different instance of a query that was executed against a database and (b) indicating a tuple (or level grouping) comprising a set of hierarchy levels corresponding to a set of dimensions. Multiple tuples indicated in the query log data are identified. For each tuple: (1) a set of entries that indicate the tuple is identified and the set of entries is associated with the tuple; (2) aggregated performance data is generated for the tuple based on performance data associated with each entry in the set of entries that is associated with the tuple; and (3) based on the aggregated performance data, it is determined whether to create a new auto-cache table or to delete an existing auto-cache table associated with the tuple.

## Claims

### Claim 1

A method comprising:
storing query log data comprising a plurality of entries, each entry (1) corresponding to a query in a plurality of queries that were executed against a database and (2) indicating a tuple comprising a set of hierarchy levels corresponding to a set of dimensions;
identifying a plurality of tuples indicated in the query log data;
for each tuple in the plurality of tuples:
identifying a set of entries that indicate said each tuple and associating the set of entries with said each tuple;
generating aggregated performance data for said each tuple based on performance data associated with each entry in the set of entries that is associated with said each tuple;
based on the aggregated performance data, determining at least one of:
whether to create an auto-cache table associated with said each tuple, or
whether to delete an auto-cache table associated with said each tuple;
wherein the method is performed by one or more computing devices.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
generating a ranking of the plurality of tuples based on the aggregated performance data;
wherein said determining is performed based on the ranking.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
determining a number of queries that are associated with a particular tuple of the plurality of tuples;
based at least on the aggregated performance data for the particular tuple and the number of queries, determining whether to create an auto-cache table for the particular tuple.

### Claim 4 (depends on 1)

The method of claim 1, wherein:
a particular tuple of the plurality of tuples is associated with a particular auto-cache table;
the aggregated performance data for the particular tuple indicates a number of queries associated with the particular tuple;
the method further comprising:
performing a comparison between the number of queries and a particular threshold number;
based on the comparison, determining whether to delete the particular auto-cache table.

### Claim 5 (depends on 1)

The method of claim 1, further comprising:
for each tuple of the plurality of tuples:
determining whether an auto-cache table for said each tuple exists;
if an auto-cache table exists for said each tuple, then:
determining a difference between (i) a current aggregated performance associated with the auto-cache table and (ii) a previous aggregated performance associated with said each tuple, and
based on the difference, determining whether to delete the auto-cache table.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
for each tuple of the plurality of tuples:
determining whether an auto-cache table for said each tuple exists;
if an auto-cache table does not exist for said each tuple, then determining whether there exists an auto-cache table associated with a tuple that supersedes said each tuple;
generating an auto-cache table for said each tuple if there does not exist an auto-cache table associated with a tuple that supersedes said each tuple.

### Claim 7 (depends on 6)

The method of claim 6, wherein determining whether the first tuple associated with the existing auto-cache table supersedes said each tuple comprises, for each dimension indicated in the first tuple:
determining whether a first hierarchy level, for said each dimension, in the first tuple is at or below a second hierarchy level, for said each dimension, in said each tuple;
in response to determining that the first hierarchy level, for said each dimension, in the first tuple is at or below the second hierarchy level, for said each dimension, in said each tuple, determining not to generate the auto-cache table for said each tuple.

### Claim 8 (depends on 6)

The method of claim 6, further comprising:
determining whether a particular hierarchy level, for a particular dimension, indicated in the first tuple is more than a threshold number of levels away from a certain hierarchy level, for said each dimension, indicated in said each tuple;
in response to determining that the particular hierarchy level, for the particular dimension, indicated in the first tuple is more than the threshold number of levels away from the certain hierarchy level, for said each dimension, indicated in said each tuple, determining that the first tuple does not supersede said each tuple.

### Claim 9 (depends on 1)

The method of claim 1, further comprising, for a particular tuple of the plurality of tuples:
storing a plurality of system parameters comprising one or more of:
a first current total size of all auto-cache tables associated with multiple views;
a second current total size of all auto-cache tables for a particular view associated with the particular tuple;
a size of the auto-cache table for the particular tuple; or
a current number of auto-cache tables;
determining whether creating an auto-cache table for the particular tuple would cause any of the plurality of system parameters to exceeds a corresponding threshold of a plurality of thresholds;
in response to determining that at least one system parameter of the plurality of system parameters exceeds a corresponding threshold of the plurality of thresholds, determining not to create an auto-cache table for the particular tuple or determining to discard another auto-cache table.

### Claim 10 (depends on 1)

The method of claim 1, wherein a first tuple of the plurality of tuples indicates a first number of hierarchy levels and a second tuple of the plurality tuples indicates a second number of hierarchy levels that is different than the first number of hierarchy levels.

### Claim 11

One or more non-transitory storage media storing instructions which, when executed by one or more computing devices, cause:
storing query log data comprising a plurality of entries, each entry (1) corresponding to a query in a plurality of queries that were executed against a database and (2) indicating a tuple comprising a set of hierarchy levels corresponding to a set of dimensions;
identifying a plurality of tuples indicated in the query log data;
for each tuple in the plurality of tuples:
identifying a set of entries that indicate said each tuple and associating the set of entries with said each tuple;
generating aggregated performance data for said each tuple based on performance data associated with each entry in the set of entries that is associated with said each tuple;
based on the aggregated performance data, determining at least one of:
whether to create an auto-cache table associated with said each tuple, or
whether to delete an auto-cache table associated with said each tuple.

### Claim 12 (depends on 11)

The one or more storage media of claim 11, wherein the instructions, when executed by the one or more processors, further cause:
generating a ranking of the plurality of tuples based on the aggregated performance data;
wherein said determining is performed based on the ranking.

### Claim 13 (depends on 11)

The one or more storage media of claim 11, wherein the instructions, when executed by the one or more processors, further cause:
determining a number of queries that are associated with a particular tuple of the plurality of tuples;
based at least on the aggregated performance data for the particular tuple and the number of queries, determining whether to create an auto-cache table for the particular tuple.

### Claim 14 (depends on 11)

The one or more storage media of claim 11, wherein:
a particular tuple of the plurality of tuples is associated with a particular auto-cache table;
the aggregated performance data for the particular tuple indicates a number of queries associated with the particular tuple;
the instructions, when executed by the one or more processors, further cause:
performing a comparison between the number of queries and a particular threshold number;
based on the comparison, determining whether to delete the particular auto-cache table.

### Claim 15 (depends on 11)

The one or more storage media of claim 11, wherein the instructions, when executed by the one or more processors, further cause:
for each tuple of the plurality of tuples:
determining whether an auto-cache table for said each tuple exists;
if an auto-cache table exists for said each tuple, then:
determining a difference between (i) a current aggregated performance associated with the auto-cache table and (ii) a previous aggregated performance associated with said each tuple, and
based on the difference, determining whether to delete the auto-cache table.

### Claim 16 (depends on 11)

The one or more storage media of claim 11, wherein the instructions, when executed by the one or more processors, further cause:
for each tuple of the plurality of tuples:
determining whether an auto-cache table for said each tuple exists;
if an auto-cache table does not exist for said each tuple, then determining whether there exists an auto-cache table associated with a tuple that supersedes said each tuple;
generating an auto-cache table for said each tuple if there does not exist an auto-cache table associated with a tuple that supersedes said each tuple.

### Claim 17 (depends on 16)

The one or more storage media of claim 16, wherein determining whether the first tuple associated with the existing auto-cache table supersedes said each tuple comprises, for each dimension indicated in the first tuple:
determining whether a first hierarchy level, for said each dimension, in the first tuple is at or below a second hierarchy level, for said each dimension, in said each tuple;
in response to determining that the first hierarchy level, for said each dimension, in the first tuple is at or below the second hierarchy level, for said each dimension, in said each tuple, determining not to generate the auto-cache table for said each tuple.

### Claim 18 (depends on 16)

The one or more storage media of claim 16, wherein the instructions, when executed by the one or more processors, further cause:
determining whether a particular hierarchy level, for a particular dimension, indicated in the first tuple is more than a threshold number of levels away from a certain hierarchy level, for said each dimension, indicated in said each tuple;
in response to determining that the particular hierarchy level, for the particular dimension, indicated in the first tuple is more than the threshold number of levels away from the certain hierarchy level, for said each dimension, indicated in said each tuple, determining that the first tuple does not supersede said each tuple.

### Claim 19 (depends on 11)

The one or more storage media of claim 11, wherein the instructions, when executed by the one or more processors, further cause, for a particular tuple of the plurality of tuples:
storing a plurality of system parameters comprising one or more of:
a first current total size of all auto-cache tables associated with multiple views;
a second current total size of all auto-cache tables for a particular view associated with the particular tuple;
a size of the auto-cache table for the particular tuple; or
a current number of auto-cache tables;
determining whether creating an auto-cache table for the particular tuple would cause any of the plurality of system parameters to exceeds a corresponding threshold of a plurality of thresholds;
in response to determining that at least one system parameter of the plurality of system parameters exceeds a corresponding threshold of the plurality of thresholds, determining not to create an auto-cache table for the particular tuple or determining to discard another auto-cache table.

### Claim 20 (depends on 11)

The one or more storage media of claim 11, wherein a first tuple of the plurality of tuples indicates a first number of hierarchy levels and a second tuple of the plurality tuples indicates a second number of hierarchy levels that is different than the first number of hierarchy levels.
