# US 2023/0267130 A1 · Analytical query processing with decoupled compute instances

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

- Number: US 2023/0267130 A1
- Document ID: US20230267130A1
- Status: Published application
- Kind: A1
- Application number: 18/309,056
- Filed: 2023-04-28
- Published: 2023-08-24
- Earliest claimed: 2020-12-14
- Assignees: Snowflake Inc.
- Applicants: Snowflake Inc.
- Inventors: Leonidas Galanis; Alexander Miller; William Waddington; Khaled Yagoub
- Web page: https://patentgrep.com/patent/US20230267130A1

## CPC

- G06F 16/258: {Data format conversion from or to a database}
- G06F 16/24524: {Access plan code generation and invalidation; Reuse of access plans}
- G06F 16/24564: {Applying rules; Deductive queries}
- G06F 16/256: {in federated or virtual databases}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F 16/283: {Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

The subject technology receives, by a first set of decoupled compute instances of a distributed database, a plurality of transactional queries against a transactional processing database stored on a first set of decoupled storage instances, at least one of the first set of decoupled compute instances bypassing a compiler of the distributed database to process the plurality of transactional queries using locally cached data. The subject technology receives at least one select query for processing on an aggregated analytical query database of the distributed database. The subject technology generates, by the compiler of the distributed database, a query plan for execution of the at least one select query using a second set of decoupled compute instances. The subject technology generates, by the second set of decoupled compute instances, an aggregated analytical query result dataset for the at least one select query according to the query plan.

## Claims

### Claim 1

A method comprising:
receiving, by a first set of decoupled compute instances of a distributed database, a plurality of transactional queries against a transactional processing database stored on a first set of decoupled storage instances, at least one of the first set of decoupled compute instances bypassing a compiler of the distributed database to process the plurality of transactional queries using locally cached data;
receiving at least one select query for processing on an aggregated analytical query database of the distributed database;
generating, by the compiler of the distributed database, a query plan for execution of the at least one select query using a second set of decoupled compute instances; and
generating, by the second set of decoupled compute instances, an aggregated analytical query result dataset for the at least one select query according to the query plan.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
receiving a transactional query for processing on transactional data in the transactional processing database;
determining that the transactional data is cached on the first set of decoupled compute instances; and
generating transactional results data by applying the transactional query on the transactional data, the first set of decoupled compute instances bypassing the compiler in generating the transactional results data and returning results to a client device that generated the transactional query, the bypassing comprising setting an active session between the client device and the first set of decoupled compute instances.

### Claim 3 (depends on 1)

The method of claim 1, further comprising:
replicating data that has changed from the transactional processing database to an object store database of an aggregated analytical query database managed by the second set of decoupled compute instances of the distributed database.

### Claim 4 (depends on 3)

The method of claim 3, wherein the aggregated analytical query database is stored on a second set of decoupled storage instances, the second set of decoupled compute instances being remote from the second set of decoupled storage instances.

### Claim 5 (depends on 1)

The method of claim 1, wherein the first set of decoupled compute instances is remote from the first set of decoupled storage instances, each of the plurality of transactional queries comprising data manipulation language statements that change data in the transactional processing database.

### Claim 6 (depends on 1)

The method of claim 1, wherein the transactional processing database is an Online Transactional Processing (OLTP) database that tracks a large volume of data transactions, and wherein the aggregated analytical query database is an Online Analytical Processing (OLAP) database comprising aggregated queries and a low volume of data transactions relative to the OLTP database.

### Claim 7 (depends on 6)

The method of claim 6, further comprising:
receiving a query and determining whether the query is an OLTP query or an OLAP query.

### Claim 8 (depends on 7)

The method of claim 7, further comprising: in response to determining the query is a OLAP query, directing the query to the OLAP database and processing the query using the second set of decoupled compute instances.

### Claim 9 (depends on 7)

The method of claim 7, further comprising: in response to determining the query is a OLTP query, directing the query to the OLTP database and processing the query using the first set of decoupled compute instances.

### Claim 10 (depends on 1)

The method of claim 1, wherein the first set of decoupled compute instances are remotely connected over a network to the first set of decoupled storage instances of the transaction processing database, and wherein the second set of decoupled compute instances are remotely connected over the network to the second set of decoupled storage instances of the aggregated analytical query database.

### Claim 11

A system comprising:
at least one hardware processor; and
memory storing instructions that, when executed by the at least one hardware processor, cause the at least one hardware processor to perform operations comprising:
receiving, by a first set of decoupled compute instances of a distributed database, a plurality of transactional queries against a transactional processing database stored on a first set of decoupled storage instances, at least one of the first set of decoupled compute instances bypassing a compiler of the distributed database to process the plurality of transactional queries using locally cached data;
receiving at least one select query for processing on an aggregated analytical query database of the distributed database;
generating, by the compiler of the distributed database, a query plan for execution of the at least one select query using a second set of decoupled compute instances; and
generating, by the second set of decoupled compute instances, an aggregated analytical query result dataset for the at least one select query according to the query plan.

### Claim 12 (depends on 11)

The system of claim 11, wherein the operations further comprise:
receiving a transactional query for processing on transactional data in the transactional processing database;
determining that the transactional data is cached on the first set of decoupled compute instances; and
generating transactional results data by applying the transactional query on the transactional data, the first set of decoupled compute instances bypassing the compiler in generating the transactional results data and returning results to a client device that generated the transactional query, the bypassing comprising setting an active session between the client device and the first set of decoupled compute instances.

### Claim 13 (depends on 11)

The system of claim 11, wherein the operations further comprise: replicating data that has changed from the transactional processing database to an object store database of an aggregated analytical query database managed by the second set of decoupled compute instances of the distributed database.

### Claim 14 (depends on 13)

The system of claim 13, wherein the aggregated analytical query database is stored on a second set of decoupled storage instances, the second set of decoupled compute instances being remote from the second set of decoupled storage instances.

### Claim 15 (depends on 11)

The system of claim 11, wherein the first set of decoupled compute instances is remote from the first set of decoupled storage instances, each of the plurality of transactional queries comprising data manipulation language statements that change data in the transactional processing database.

### Claim 16 (depends on 11)

The system of claim 11, wherein the transactional processing database is an Online Transactional Processing (OLTP) database that tracks a large volume of data transactions, and wherein the aggregated analytical query database is an Online Analytical Processing (OLAP) database comprising aggregated queries and a low volume of data transactions relative to the OLTP database.

### Claim 17 (depends on 16)

The system of claim 16, wherein the operations further comprise:
receiving a query and determining whether the query is an OLTP query or an OLAP query.

### Claim 18 (depends on 17)

The system of claim 17, wherein the operations further comprise: in response to determining the query is a OLAP query, directing the query to the OLAP database and processing the query using the second set of decoupled compute instances.

### Claim 19 (depends on 17)

The system of claim 17, wherein the operations further comprise: in response to determining the query is a OLTP query, directing the query to the OLTP database and processing the query using the first set of decoupled compute instances.

### Claim 20

A computer-storage medium embodying instructions that, when executed by a at least one hardware processor, cause the at least one hardware processor to perform operations comprising:
receiving, by a first set of decoupled compute instances of a distributed database, a plurality of transactional queries against a transactional processing database stored on a first set of decoupled storage instances, at least one of the first set of decoupled compute instances bypassing a compiler of the distributed database to process the plurality of transactional queries using locally cached data;
receiving at least one select query for processing on an aggregated analytical query database of the distributed database;
generating, by the compiler of the distributed database, a query plan for execution of the at least one select query using a second set of decoupled compute instances; and
generating, by the second set of decoupled compute instances, an aggregated analytical query result dataset for the at least one select query according to the query plan.
