Dynamic Query Allocation Across Virtual Warehouses for Cost Control

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing virtual warehouse systems face inefficiencies due to misconfiguration and misuse, leading to wasted computing resources and increased costs, particularly in cloud-based data warehousing services like Snowflake, where users can inadvertently submit poorly formatted queries or allocate queries to inappropriate virtual warehouses, resulting in excessive resource usage and financial costs.

Innovation Solution

A dynamic query allocation system that selects virtual warehouses based on processing complexity, operating status, and processing capabilities, optimizing query execution by allocating queries to the most suitable virtual warehouses, and providing user interfaces for cost tracking and notifications to manage resource usage effectively.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If users can freely select and execute queries on multiple virtual warehouses, then query execution flexibility and user autonomy are improved, but resource waste and operational costs increase due to misconfiguration and misuse

Engineering Contradiction:
Improvequery execution flexibilityVSAvoidcomputing resource waste
Core Design Contradiction:
Adaptability or versatilityVSLoss of energy

Solution Approach 1:

The system implements feedback mechanisms by monitoring query characteristics and virtual warehouse performance metrics in real-time. The query router uses this feedback to dynamically adjust query allocation decisions, learning from past execution patterns to optimize resource utilization while maintaining user flexibility in query execution choices.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The system dynamically changes operational parameters including query routing rules, virtual warehouse resource allocation, and execution priorities based on real-time system state. By adjusting these parameters adaptively, the system optimizes the balance between user flexibility and resource efficiency without requiring rigid constraints on query execution.

Inventive Principle:
Principle #35Parameter changes

2Power

If virtual warehouses are allocated to handle complex queries, then query processing capability is improved, but system complexity and management difficulty increase

Engineering Contradiction:
Improvequery processing capabilityVSAvoidsystem management complexity
Core Design Contradiction:
PowerVSDevice complexity

Solution Approach 1:

The query router acts as an intermediary between users and virtual warehouses, absorbing the complexity of query analysis and warehouse selection. This intermediary component automatically evaluates query characteristics and matches them to appropriate virtual warehouses, shielding users from system complexity while maintaining high processing capabilities.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The system implements self-service mechanisms where the query router autonomously analyzes incoming queries, determines optimal execution venues, and routes them without manual intervention. This automation reduces management overhead while preserving the ability to handle complex queries across multiple virtual warehouses.

Inventive Principle:
Principle #25Self-service

3Productivity

If query execution is allowed on all available virtual warehouses, then query completion time is reduced through parallel processing, but cost control and resource optimization deteriorate

Engineering Contradiction:
Improvequery completion speedVSAvoidoperational cost
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The system applies local quality optimization by routing different portions of query workloads to virtual warehouses with locally optimal characteristics. Instead of uniformly distributing all queries, the system matches specific query requirements to the appropriate virtual warehouse environment, achieving efficient parallel processing while controlling costs through targeted resource utilization.

Inventive Principle:
Principle #3Local quality

4Ease of operation

If users are permitted to execute queries without restrictions, then user autonomy and query execution freedom are improved, but system reliability and cost predictability worsen due to malformed or overly broad queries

Engineering Contradiction:
Improveuser autonomyVSAvoidsystem reliability
Core Design Contradiction:
Ease of operationVSReliability

Solution Approach 1:

The system performs preliminary actions by analyzing and validating queries before execution. The query router pre-evaluates query characteristics, estimates resource requirements, and determines appropriate virtual warehouse assignments in advance, preventing malformed or overly broad queries from causing system issues while maintaining user autonomy in query submission.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12386840B2Dynamic query allocation to virtual warehouses
Publication Date: 2025.08.12 CAPITAL ONE SERVICES LLC
  • US12386840B2 patent drawing
  • US12386840B2 patent drawing
  • US12386840B2 patent drawing

AI summary

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.