Database Query Scheduling via Dynamic Cost Analysis

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database systems face inefficiencies in scheduling database queries due to bottlenecks caused by long data operations, particularly those involving large network transfers, which hinder the processing of other operations until the initial operations are complete.

Innovation Solution

A database server calculates operation costs and types for each node in a query plan, identifies leaf nodes that do not depend on other operations, and schedules them first, allowing for overlapping operations with different resource types to minimize overall processing time by utilizing parallel processing.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If naive scheduling based on topological order is used, then implementation simplicity is maintained, but processing time increases due to bottlenecks from long network transfer operations

Engineering Contradiction:
Improvescheduling implementation simplicityVSAvoidquery processing time
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

The patent applies dynamics by transitioning from a static topological ordering to a dynamic cost-based scheduling approach. The system calculates operation costs dynamically, considering factors like network transfer sizes and operation types, and adjusts the scheduling order based on these costs. This allows the scheduler to adaptively prioritize operations, placing potentially long-running network operations earlier in the execution plan when they can overlap with subsequent operations, thereby reducing total query processing time while maintaining implementation feasibility through a structured cost calculation framework

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the scheduling parameter from simple topological order to a cost-based metric. By introducing operation cost as a scheduling parameter that incorporates network transfer sizes, operation types, and resource requirements, the system optimizes the execution order. The cost model evaluates different scheduling scenarios and selects the order that minimizes total execution time by allowing overlapping of independent operations, thus resolving the contradiction between simplicity and processing time

Inventive Principle:
Principle #35Parameter changes

2Reliability

If operations are executed in topological order, then data dependency constraints are satisfied, but parallel processing opportunities are lost due to sequential execution

Engineering Contradiction:
Improvedata dependency satisfactionVSAvoidquery processing throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies preliminary action by calculating and analyzing operation costs and dependencies before finalizing the execution schedule. The system performs a cost-based analysis phase where it evaluates all operations, determines their resource requirements and potential overlaps, and pre-computes an optimized execution order. This preliminary cost analysis enables the scheduler to identify parallel execution opportunities while ensuring data dependency constraints are met, thus improving throughput without sacrificing reliability

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements continuity of useful action by optimizing the execution schedule to minimize idle time and maximize overlapping of independent operations. The cost-based scheduler identifies operations that can execute in parallel and arranges them to run concurrently, ensuring that computational resources remain continuously utilized. By allowing network transfer operations to overlap with subsequent processing operations, the system maintains continuous productive action throughout the query execution, thereby improving throughput while preserving data dependency constraints

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS10956417B2Dynamic operation scheduling for distributed data processing
Publication Date: 2021.03.23 ORACLE INT CORP
  • US10956417B2 patent drawing
  • US10956417B2 patent drawing
  • US10956417B2 patent drawing

AI summary

Techniques are provided for scheduling data operations for a given query based upon a query-cost model that analyzes the cost of scheduling data operations based upon their operation cost and the type of resources needed for the operation. In an embodiment, a database server receives a set of operations for a query. The database server determines a set of leaf operation nodes from the set of data operations, where the set of leaf operation nodes includes operation nodes that do not depend on the execution of other nodes within the set of data operations. The database server compares operation costs between the leaf operation nodes to determine which leaf operation node to insert into a scheduled order set. The database server inserts the leaf operation node into the scheduled order set. Then the database server iteratively determines new leaf operation nodes and performs cost analysis on remaining leaf operation nodes to generate a set of scheduled data operations.