# US 2023/0267119 A1 · Data retrieval systems and methods

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

- Number: US 2023/0267119 A1
- Document ID: US20230267119A1
- Status: Published application
- Kind: A1
- Application number: 18/141,966
- Filed: 2023-05-01
- Published: 2023-08-24
- Earliest claimed: 2020-09-29
- Assignees: Atlassian Pty Ltd.; Atlassian US, Inc.
- Applicants: Atlassian Pty Ltd.; Atlassian US, Inc.
- Inventors: Andre van der Schyff; Guido Rota; Matthew Robert Knox; Thiago Tasca Nunes; Viktor Krisztian Adam, JR.
- Web page: https://patentgrep.com/patent/US20230267119A1

## CPC

- G06F 16/24537: {of operators}
- G06F 16/2433: {Query languages}
- G06F 16/24539: {using cached or materialised query results}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Described herein is a computer implemented method. The method comprises generating a subscription identifier based on an original SQL query and determining if a set of first stage query results is associated with the subscription identifier in a cache. If so, the method further comprises generating a second stage SQL query based on a second subset of the plurality of clauses and the set of first stage query results, causing execution of the second stage SQL query to obtain a set of second stage query results from a database, and returning the set of second stage query results.

## Claims

### Claim 1

A computer implemented method comprising:
receiving a request defining an original structured query language (SQL) query, the original SQL query including a plurality of clauses;
generating a subscription identifier based on the original SQL query;
determining if a set of first stage query results is associated with the subscription identifier in a cache;
in response to determining that the set of first stage query results is associated with the subscription identifier in the cache:
generating a second stage SQL query based on a second subset of the plurality of clauses and the set of first stage query results;
causing execution of the second stage SQL query to obtain a set of second stage query results from a database; and
returning the set of second stage query results.

### Claim 2 (depends on 1)

The computer implemented method of claim 1, further comprising processing the plurality of clauses by, for a given clause of the plurality of clauses:
determining a type of the given clause; and
in response to determining that the given clause is a non-caching type, adding the given clause to the second subset.

### Claim 3 (depends on 2)

The computer implemented method of claim 2, wherein the given clause is the non-caching type clause if the given clause is a dynamic clause.

### Claim 4 (depends on 2)

The computer implemented method of claim 2, wherein the given clause is the non-caching type clause if the given clause references a database field which can have its own permission scheme.

### Claim 5 (depends on 1)

The computer implemented method of claim 1, wherein the subscription identifier includes a query identifier that is generated by calculating a hash of a first subset of the plurality of clauses.

### Claim 6 (depends on 5)

The computer implemented method of claim 5, further comprising processing the plurality of clauses by, for a given clause of the plurality of clauses:
determining a type of the given clause; and
in response to determining that the given clause is a caching type clause, adding the given clause to the first subset.

### Claim 7 (depends on 1)

The computer implemented method of claim 1, wherein the subscription identifier further includes a tenant identifier, the tenant identifier identifying a tenant that is associated with an account that initiated the database request.

### Claim 8 (depends on 1)

The computer implemented method of claim 1, wherein the second stage SQL query includes an ordering clause taken from the original SQL query.

### Claim 9 (depends on 1)

The computer implemented method of claim 1, further comprising:
determining whether a too many records flag is associated with the subscription identifier in the cache; and
in response to determining that the too many records flag is associated with the subscription identifier in the cache, foregoing generating the second stage SQL query and instead:
causing execution of the original SQL query to obtain a set of original SQL query results from the database;
returning the set of original SQL query results.

### Claim 10 (depends on 1)

The computer implemented method of claim 1, further comprising:
determining whether a stale flag is associated with the subscription identifier in the cache; and
in response to determining that the stale flag is associated with the subscription identifier in the cache, triggering an asynchronous update process which operates to update the set of first stage query results in the cache.

### Claim 11 (depends on 1)

The computer implemented method of claim 1, further comprising:
determining whether the set of first stage query results has expired; and
in response to determining that the set of first stage query results has expired, triggering an asynchronous update process which operates to update the set of first stage query results in the cache.

### Claim 12 (depends on 1)

The computer implemented method of claim 1, further comprising:
determining whether a stale flag is associated with the subscription identifier in the cache;
determining whether the set of first stage query results has expired; and
in response to determining either that the stale flag is associated with the subscription identifier in the cache or that the set of first stage query results has expired, triggering an asynchronous update process which operates to update the set of first stage query results in the cache.

### Claim 13 (depends on 1)

The computer implemented method of claim 1, wherein the set of first stage query results was generated and stored in the cache prior to receiving the request and based on a set of caching clauses that match a first subset of the plurality of clauses.

### Claim 14

A computer processing system comprising:
a processing unit;
a communications interface; and
a non-transitory computer-readable storage medium storing sequences of instructions, which when executed by the processing unit, cause the processing unit to:
receive, via the communications interface, a request defining an original structured query language (SQL) query, the original SQL query including a plurality of clauses;
generate a subscription identifier based on the original SQL query;
determine if a set of first stage query results is associated with the subscription identifier in a cache;
in response to determining that the set of first stage query results is associated with the subscription identifier in the cache:
generate a second stage SQL query based on a second subset of the plurality of clauses and the set of first stage query results;
cause execution of the second stage SQL query to obtain a set of second stage query results from a database; and
return the set of second stage query results.

### Claim 15 (depends on 14)

The computer processing system of claim 14, wherein execution of the sequences of instructions further causes the processing unit to process the plurality of clauses by, for a given clause of the plurality of clauses:
determine a type of the given clause; and
in response to determining that the given clause is a non-caching type, add the given clause to the second subset.

### Claim 16 (depends on 15)

The computer processing system of claim 15, wherein the given clause is the non-caching type clause if the given clause is a dynamic clause.

### Claim 17 (depends on 14)

The computer processing system of claim 14, wherein execution of the sequences of instructions further causes the processing unit to:
determine whether a too many records flag is associated with the subscription identifier in the cache; and
in response to determining that the too many records flag is associated with the subscription identifier in the cache, forego generating the second stage SQL query and instead:
cause execution of the original SQL query to obtain a set of original SQL query results from the database; and
return the set of original SQL query results.

### Claim 18 (depends on 14)

The computer processing system of claim 14, wherein execution of the sequences of instructions further causes the processing unit to:
determine whether a stale flag is associated with the subscription identifier in the cache; and
in response to determining that the stale flag is associated with the subscription identifier in the cache, trigger an asynchronous update process which operates to update the set of first stage query results in the cache.

### Claim 19 (depends on 14)

The computer processing system of claim 14, wherein execution of the sequences of instructions further causes the processing unit to:
determine whether the set of first stage query results has expired; and
in response to determining that the set of first stage query results has expired, trigger an asynchronous update process which operates to update the set of first stage query results in the cache.

### Claim 20 (depends on 14)

The computer processing system of claim 14, wherein the set of first stage query results was generated and stored in the cache prior to receiving the request and based on a set of caching clauses that match a first subset of the plurality of clauses.
