# US 2017/0293626 A1 · Managing persistent database result sets

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

- Number: US 2017/0293626 A1
- Document ID: US20170293626A1
- Status: Published application
- Kind: A1
- Application number: 15/097,107
- Filed: 2016-04-12
- Published: 2017-10-12
- Earliest claimed: 2016-04-12
- Assignees: Snowflake Computing, Inc.
- Applicants: Snowflake Computing, Inc.
- Inventors: Benoit Dageville; Jiansheng Huang; Shige Takeda; Abdul Q. Munir
- Web page: https://patentgrep.com/patent/US20170293626A1

## CPC

- G06F 16/24539: {using cached or materialised query results}
- H04L 67/1097: for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]
- G06F 16/125: {characterised by the use of retention policies (retention policies for HSM systems G06F16/185)}
- G06F 16/156: {Query results presentation}
- G06F 16/162: {Delete operations (erasing in storage systems G06F3/0652)}
- G06F 16/2455: Query execution
- H04L 67/06: specially adapted for file transfer, e.g. file transfer protocol [FTP]
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- H04L: TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION (arrangements common to telegraphic and telephonic communication H04M)

## Abstract

A method, system, and apparatus for managing a persistent query result set are disclosed. A resource manager is disclosed that receives a query from a client over a computer network. A computer database server is disclosed that executes the query and generates a result set based on and in response to the received query. An execution platform is disclosed that divides the result set into a plurality of chunks, wherein each chunk comprises a portion of the generated result set. The resource manager adds metadata to each of the plurality of chunks. A first chunk of the plurality of chunks comprises metadata pointing to the plurality of chunks. The resource manager delivers at least the first chunk of the plurality of chunks to the client in response to the query. The execution platform offloads the remaining plurality of chunks to cloud storage in parallel.

## Claims

### Claim 1

A method for managing a persistent query result set in a computer system having a plurality of data file sets stored in computer accessible storage comprising:
receiving a query from a client over a computer network;
executing the query on a computer database server;
generating a result set based on the received query;
dividing the result set into a first chunk and a plurality of chunks, wherein each chunk of the plurality of chunks comprises a portion of the generated result set;
adding metadata to the plurality of chunks, wherein the first chunk comprises a portion of the generated result set and pointers pointing to the plurality of chunks;
delivering at least the first chunk to the client in response to the query; and
delivering the plurality of chunks to cloud storage in parallel with each other, such that the plurality of chunks is offloaded in cloud storage.

### Claim 2 (depends on 1)

The method of claim 1, wherein the plurality of chunks is delivered to the client simultaneously through multiple computer network pipes, such that the result set is delivered asynchronously and in parallel thereby decreasing the database server resource requirements and increasing the client's speed of retrieving the result set.

### Claim 3 (depends on 1)

The method of claim 1, wherein the pointers pointing to the plurality of chunks comprises data in a manifest file listing chunk data files and number of rows contained in each of the plurality of chunks.

### Claim 4 (depends on 1)

The method of claim 1, wherein the method further comprises sending the result set to and storing the result set on cloud storage, such that an average production time for producing the result set is decreased by caching said result set in cloud storage.

### Claim 5 (depends on 1)

The method of claim 1, wherein the query execution on the database server is decoupled from consumption of the result set by the client, such that the result set can be generated by the database server and generation of said result set is not limited by the speed of the client's consumption of said result set.

### Claim 6 (depends on 1)

The method of claim 1, wherein the method further comprises streaming the result set for consumption by the client by delivering at least the first chunk to the client while at least one of the plurality of chunks is being produced.

### Claim 7 (depends on 1)

The method of claim 1, wherein the method further comprises cleaning the result set in cloud storage.

### Claim 8 (depends on 7)

The method of claim 7, wherein a resource manager cleans the result set stored in cloud storage.

### Claim 9 (depends on 8)

The method of claim 8, wherein cleaning the result set comprises setting an expiration date for the result set.

### Claim 10 (depends on 8)

The method of claim 8, wherein cleaning the result set comprises setting system wide result set lifecycle policies to remove unwanted result sets.

### Claim 11 (depends on 8)

The method of claim 8, wherein cleaning the result set comprises setting required and omitted computer network pipes.

### Claim 12 (depends on 1)

The method of claim 1, wherein an execution platform divides the result set into the first chunk and the plurality of chunks.

### Claim 13 (depends on 1)

The method of claim 1, wherein a resource manager automatically adds metadata to each of the plurality of chunks as the plurality of chunks of the result set is being produced.

### Claim 14 (depends on 1)

The method of claim 1, wherein an execution platform automatically sends the plurality of chunks that is generated to cloud storage as the remaining chunks are being produced.

### Claim 15 (depends on 1)

The method of claim 1, wherein the method further comprises enabling the client, after downloading at least the first chunk and associated metadata pointing to the corresponding plurality of chunks, to download one or more of the plurality of chunks at a later time from the cloud storage, such that the connection state between the client and the database server is flexible.

### Claim 16 (depends on 15)

The method of claim 15, wherein the method further comprises processing the result set in parallel in response to the query even after the client is disconnected from the database server.

### Claim 17 (depends on 1)

The method of claim 1, wherein the method further comprises enabling the client to scroll through the result set by requesting delivery of a specific chunk of the plurality of chunks, such that the specific chunk relevant to the client's request is delivered to the client for consumption.

### Claim 18 (depends on 1)

The method of claim 1, wherein the method further comprises enabling the client to consume the result set from a different computing machine than from which the query was sent.

### Claim 19 (depends on 1)

The method of claim 1, wherein the method further comprises building a first class object database and storing previous queries as a first class database object, thereby providing the ability to query results of previous queries.

### Claim 20 (depends on 19)

The method of claim 19, wherein the method further comprises enabling the client to audit the queries and result sets of said queries.

### Claim 21 (depends on 19)

The method of claim 19, wherein the method further comprises enabling the client to share the queries and result sets of said queries.

### Claim 22 (depends on 19)

The method of claim 19, wherein the method further comprises categorizing queries in the first class object database and returning multiple result sets in response to the query.

### Claim 23

A networked computer system comprising processors, memory, and storage for processing and storing distributed sets of digital files that are distributed over a plurality of storage devices, wherein computer executable instructions for managing a persistent query result set cause computer hardware to perform the instructions, the system comprising:
a resource manager module that receives a query from a client over a computer network;
a computer database server that executes the query and generates a result set based on the received query;
an execution platform module that divides the result set into a first chunk and a plurality of chunks, wherein each chunk of the plurality of chunks comprises a portion of the generated result set;
wherein the resource manager module adds metadata to the plurality of chunks, wherein the first chunk comprises a portion of the generated result set and pointers pointing to the plurality of chunks;
wherein the resource manager module delivers at least the first chunk to the client in response to the query; and
wherein the execution platform module delivers the plurality of chunks to cloud storage in parallel with each other, such that the generated result set is offloaded in cloud storage.

### Claim 24 (depends on 23)

The system of claim 23, wherein the plurality of chunks is delivered to the client simultaneously through multiple computer network pipes, such that the result set is delivered asynchronously and in parallel thereby decreasing the database server resource requirements and increasing the client's speed of retrieving the result set.

### Claim 25 (depends on 23)

The system of claim 23, wherein the pointers pointing to the plurality of chunks comprises data in a manifest file listing chunk data files and number of rows contained in each of the plurality of chunks.

### Claim 26 (depends on 23)

The system of claim 23, wherein the execution platform module sends the result set to and stores the result set on cloud storage, such that an average production time for producing the result set is decreased by caching said result set in cloud storage.

### Claim 27 (depends on 23)

The system of claim 23, wherein the query execution on the database server is decoupled from consumption of the result set by the client, such that the result set can be generated by the database server and generation of said result set is not limited by the speed of the client's consumption of said result set.

### Claim 28 (depends on 23)

The system of claim 23, wherein the system further comprises streaming the result set for consumption by the client wherein the resource manager module delivers at least the first chunk to the client while at least one of the plurality of chunks is being produced by the execution platform module.

### Claim 29 (depends on 23)

The system of claim 23, wherein the resource manager module cleans the result set stored in cloud storage.

### Claim 30 (depends on 29)

The system of claim 29, wherein resource manager cleans the result set by setting an expiration date for the result set.

### Claim 31 (depends on 29)

The system of claim 29, wherein resource manager cleans the result set by setting system wide result set lifecycle policies to remove unwanted result sets.

### Claim 32 (depends on 29)

The system of claim 29, wherein resource manager cleans the result set by setting required and omitted computer network pipes.

### Claim 33 (depends on 23)

The system of claim 23, wherein the resource manager module automatically adds metadata to each of the plurality of chunks as the plurality of chunks of the result set is being produced.

### Claim 34 (depends on 23)

The system of claim 23, wherein the execution platform automatically sends the plurality of chunks that is generated to cloud storage as the remaining chunks are being produced.

### Claim 35 (depends on 23)

The system of claim 23, wherein the system enables the client, after downloading at least the first chunk and associated metadata pointing to the corresponding plurality of chunks, to download one or more of the plurality of chunks at a later time from the cloud storage, such that the connection state between the client and the database server is flexible.

### Claim 36 (depends on 35)

The system of claim 35, wherein the execution platform module processes the result set in parallel in response to the query even after the client is disconnected from the database server.

### Claim 37 (depends on 23)

The system of claim 23, wherein the system enables the client to scroll through the result set by requesting delivery of a specific chunk of the plurality of chunks, such that the specific chunk relevant to the client's request is delivered to the client for consumption.

### Claim 38 (depends on 23)

The system of claim 23, wherein the system enables the client to consume the result set from a different computing machine than from which the query was sent.

### Claim 39 (depends on 23)

The system of claim 23, wherein the execution platform module builds a first class object database and stores previous queries as a first class database object, thereby providing the ability to query results of previous queries.

### Claim 40 (depends on 39)

The system of claim 39, wherein the system enables the client to audit the queries and result sets of said queries.

### Claim 41 (depends on 39)

The system of claim 39, wherein the system enables the client to share the queries and result sets of said queries.

### Claim 42 (depends on 39)

The system of claim 39, wherein the execution platform module categorizes the queries in the first class object database and returns multiple result sets in response to the query.

### Claim 43

A system for managing a persistent query result set comprising:
a means for receiving a query from a client over a computer network;
a means for executing the query and generating a result set based on the received query;
a means for dividing the result set into a first chunk and a plurality of chunks, wherein each chunk of the plurality of chunks comprises a portion of the generated result set;
a means for adding metadata to the plurality of chunks, wherein the first chunk comprises a portion of the generated result set and pointers pointing to the plurality of chunks;
a means for delivering at least the first chunk to the client in response to the query; and
a means for delivering the plurality of chunks to cloud storage in parallel with each other, such that the plurality of chunks is offloaded in cloud storage.

### Claim 44 (depends on 43)

The system of claim 43, wherein the system further includes a means for delivering the plurality of chunks to the client simultaneously through multiple computer network pipes, such that the result set is delivered asynchronously and in parallel thereby decreasing the database server resource requirements and increasing the client's speed of retrieving the result set.

### Claim 45 (depends on 43)

The system of claim 43, wherein the pointers pointing to the plurality of chunks comprises data in a manifest file listing chunk data files and number of rows contained in each of the plurality of chunks.

### Claim 46 (depends on 43)

The system of claim 43, wherein the system further comprises a means for sending the result set to and storing the result set on cloud storage, such that an average production time for producing the result set is decreased by caching said result set in cloud storage.

### Claim 47 (depends on 43)

The system of claim 43, wherein the query execution on the database server is decoupled from consumption of the result set by the client, such that the result set can be generated by the database server and generation of said result set is not limited by the speed of the client's consumption of said result set.

### Claim 48 (depends on 43)

The system of claim 43, wherein the system further comprises a means for streaming the result set for consumption by the client by delivering at least the first chunk to the client while at least one of the plurality of chunks is being produced.

### Claim 49 (depends on 43)

The system of claim 43, wherein the system further comprises a means for cleaning the result set in cloud storage.

### Claim 50 (depends on 49)

The system of claim 49, wherein the means for cleaning comprises a resource manager that cleans the result set stored in cloud storage.

### Claim 51 (depends on 50)

The system of claim 50, wherein the means for cleaning comprises setting an expiration date for the result set.

### Claim 52 (depends on 50)

The system of claim 50, wherein means for cleaning comprises setting system wide result set lifecycle policies to remove unwanted result sets.

### Claim 53 (depends on 50)

The system of claim 50, wherein the means for cleaning comprises setting required and omitted computer network pipes.

### Claim 54 (depends on 43)

The system of claim 43, wherein the means for dividing the result set into the first chunk and the plurality of chunks comprises an execution platform.

### Claim 55 (depends on 43)

The system of claim 43, wherein a resource manager automatically adds metadata to each of the plurality of chunks as the plurality of chunks of the result set are being produced.

### Claim 56 (depends on 43)

The system of claim 43, wherein the system further comprises a means for automatically sending the plurality of chunks that is generated to cloud storage as the remaining chunks are being produced.

### Claim 57 (depends on 43)

The system of claim 43, wherein the system further comprises a means for enabling the client, after downloading at least the first chunk and associated metadata pointing to the corresponding plurality of chunks, to download one or more of the plurality of chunks at a later time from the cloud storage, such that the connection state between the client and the database server is flexible.

### Claim 58 (depends on 57)

The system of claim 57, wherein the system further comprises a means for processing the result set in parallel in response to the query even after the client is disconnected from the database server.

### Claim 59 (depends on 43)

The system of claim 43, wherein the system further comprises a means for enabling the client to scroll through the result set by requesting delivery of a specific chunk of the plurality of chunks, such that the specific chunk relevant to the client's request is delivered to the client for consumption.

### Claim 60 (depends on 43)

The system of claim 43, wherein the system further comprises a means for enabling the client to consume the result set from a different computing machine than from which the query was sent.

### Claim 61 (depends on 43)

The system of claim 43, wherein the system further comprises a means for building a first class object database and storing previous queries as a first class database object, thereby providing the ability to query results of previous queries.

### Claim 62 (depends on 61)

The system of claim 61, wherein the system further comprises a means for enabling the client to audit the queries and result sets of said queries.

### Claim 63 (depends on 61)

The system of claim 61, wherein the system further comprises a means for enabling the client to share the queries and result sets of said queries.

### Claim 64 (depends on 61)

The system of claim 61, wherein the system further comprises a means for categorizing queries in the first class object database and returning multiple result sets in response to the query.
