# US 2023/0267125 A1 · Dynamic query allocation to virtual warehouses

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

- Number: US 2023/0267125 A1
- Document ID: US20230267125A1
- Status: Published application
- Kind: A1
- Application number: 18/140,260
- Filed: 2023-04-27
- Published: 2023-08-24
- Earliest claimed: 2021-07-13
- Assignees: Capital One Services, LLC
- Applicants: Capital One Services, LLC
- Inventors: Praveen Kandukuri; Syed Shamaz Salim; Karamchandradatt Hardatt; Nagender Gurram; Ganesh Bharathan; Yudhish Batra
- Web page: https://patentgrep.com/patent/US20230267125A1

## CPC

- G06F 16/24575: {using context}
- G06F 16/283: {Multi-dimensional databases or data warehouses, e.g. MOLAP or ROLAP}
- G06F 9/5005: {to service a request}
- G06F 16/256: {in federated or virtual databases}
- G06N 20/00: Machine learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Methods, systems, and apparatuses for managing and selecting virtual warehouses for execution of queries on one or more data warehouses are described herein. A request to execute a query may be received. An execution plan, for the query, may be identified. A processing complexity for the query may be predicted based on the query and the execution plan. A plurality of virtual warehouses may be identified. An operating status and processing capabilities of the plurality of virtual warehouses may be determined. A subset of the plurality of virtual warehouses may be selected based on the processing complexity, the operating status of the plurality of virtual warehouses, and the processing capabilities of the plurality of virtual warehouses. The query may be executed on one of the subset of the plurality of virtual warehouses.

## Claims

### Claim 1

A computing device comprising:
one or more processors; and
memory storing instructions that, when executed by the one or more processors, cause the computing device to:
receive, from a user device, a request to execute a query on at least one of a plurality of data warehouses;
modify the query by adding, to a metadata field of the query, information that identifies a user of the user device;
identify a plurality of virtual warehouses, wherein each of the plurality of virtual warehouses comprises a respective set of computing resources configured to:
execute one or more queries with respect to at least a portion of the plurality of data warehouses;
collect results from the one or more queries; and
provide, to the user device, access to the collected results;
select a first virtual warehouse of the plurality of virtual warehouses based on one or more of:
an operating status of the plurality of virtual warehouses,
processing capabilities of the plurality of virtual warehouses, or
a predicted processing complexity of the query;
cause the first virtual warehouse to execute the query;
receive, based on execution of the query by the first virtual warehouse:
query results that comprise the metadata field; and
costs data;
extract the information that identifies the user of the user device from the metadata field in the query results; and
output, based on the costs data and the extracted information in the metadata field of the query results, query cost information corresponding to the information.

### Claim 2 (depends on 1)

The computing device of claim 1, wherein the instructions, when executed by the one or more processors, further cause the computing device to:
identify an execution plan for the query by determining one or more sub-queries to be executed with respect to one or more of the plurality of data warehouses;
determine, based on the query and the execution plan, the predicted processing complexity of the query.

### Claim 3 (depends on 1)

The computing device of claim 1, wherein the costs data corresponds to a quantity of data processed by the first virtual warehouse.

### Claim 4 (depends on 1)

The computing device of claim 1, wherein the costs data corresponds to a time period during which the first virtual warehouse executed the query.

### Claim 5 (depends on 1)

The computing device of claim 1, wherein the output query cost information comprises a report of query costs, associated with the information, over a period of time.

### Claim 6 (depends on 1)

The computing device of claim 1, wherein the output query cost information comprises an indication of aggregated query cost information for a plurality of different organizations.

### Claim 7 (depends on 1)

The computing device of claim 1, wherein the query cost information is based on a size of the first virtual warehouse.

### Claim 8

A method comprising:
receiving, from a user device, a request to execute a query on at least one of a plurality of data warehouses;
modifying the query by adding, to a metadata field of the query, information that identifies a user of the user device;
identifying a plurality of virtual warehouses, wherein each of the plurality of virtual warehouses comprises a respective set of computing resources configured to:
execute one or more queries with respect to at least a portion of the plurality of data warehouses;
collect results from the one or more queries; and
provide, to the user device, access to the collected results;
selecting a first virtual warehouse of the plurality of virtual warehouses based on one or more of:
an operating status of the plurality of virtual warehouses,
processing capabilities of the plurality of virtual warehouses, or
a predicted processing complexity of the query;
causing the first virtual warehouse to execute the query;
receiving, based on execution of the query by the first virtual warehouse:
query results that comprise the metadata field; and
costs data;
extracting the information that identifies the user of the user device from the metadata field in the query results; and
outputting, based on the costs data and the extracted information in the metadata field of the query results, query cost information corresponding to the information.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
identifying an execution plan for the query by determining one or more sub-queries to be executed with respect to one or more of the plurality of data warehouses;
determine, based on the query and the execution plan, the predicted processing complexity of the query.

### Claim 10 (depends on 8)

The method of claim 8, wherein the costs data corresponds to a quantity of data processed by the first virtual warehouse.

### Claim 11 (depends on 8)

The method of claim 8, wherein the costs data corresponds to a time period during which the first virtual warehouse executed the query.

### Claim 12 (depends on 8)

The method of claim 8, wherein output query cost information comprises a report of query costs, associated with the information, over a period of time.

### Claim 13 (depends on 8)

The method of claim 8, wherein the output query cost information comprises an indication of aggregated query cost information for a plurality of different organizations.

### Claim 14 (depends on 8)

The method of claim 8, wherein the query cost information is based on a size of the first virtual warehouse.

### Claim 15

One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause a computing device to:
receive, from a user device, a request to execute a query on at least one of a plurality of data warehouses;
modify the query by adding, to a metadata field of the query, information that identifies a user of the user device;
identify a plurality of virtual warehouses, wherein each of the plurality of virtual warehouses comprises a respective set of computing resources configured to:
execute one or more queries with respect to at least a portion of the plurality of data warehouses;
collect results from the one or more queries; and
provide, to the user device, access to the collected results;
select a first virtual warehouse of the plurality of virtual warehouses based on one or more of:
an operating status of the plurality of virtual warehouses,
processing capabilities of the plurality of virtual warehouses, or
a predicted processing complexity of the query;
cause the first virtual warehouse to execute the query;
receive, based on execution of the query by the first virtual warehouse:
query results that comprise the metadata field; and
costs data;
extract the information that identifies the user of the user device from the metadata field in the query results; and
output, based on the costs data and the extracted information in the metadata field of the query results, query cost information corresponding to the information.

### Claim 16 (depends on 15)

The computer-readable media of claim 15, wherein the instructions, when executed by the one or more processors, further cause the computing device to:
identify an execution plan for the query by determining one or more sub-queries to be executed with respect to one or more of the plurality of data warehouses;
determine, based on the query and the execution plan, the predicted processing complexity of the query.

### Claim 17 (depends on 15)

The computer-readable media of claim 15, wherein the costs data corresponds to a quantity of data processed by the first virtual warehouse.

### Claim 18 (depends on 15)

The computer-readable media of claim 15, wherein the costs data corresponds to a time period during which the first virtual warehouse executed the query.

### Claim 19 (depends on 15)

The computer-readable media of claim 15, wherein the output query cost information comprises a report of query costs, associated with the information, over a period of time.

### Claim 20 (depends on 15)

The computer-readable media of claim 15, wherein the output query cost information comprises an indication of aggregated query cost information for a plurality of different organizations.
