Graph-Based Query Optimizer for Parallel Job Scheduling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Query optimization frameworks like the Cascades framework are not suitable for multi-core architectures, as they can only execute jobs sequentially, limiting the ability to take advantage of increased CPU performance from multiple cores, which is essential for computationally intensive tasks like query optimization.

Innovation Solution

A graph-based query optimizer is introduced that builds a dependency graph to represent and schedule query optimization jobs across multiple cores, allowing for parallel execution of jobs based on encoded dependencies, utilizing a state machine to manage job states and minimize lock contention.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a stack-based scheduler is used to manage query optimization jobs, then job execution order is controlled, but parallel execution across multiple cores is prevented

Engineering Contradiction:
Improvequery optimization speedVSAvoidscheduler architecture
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments the sequential stack-based scheduler into multiple independent worker threads that can execute jobs in parallel. Each worker thread maintains its own stack and executes jobs independently, allowing the system to utilize multiple CPU cores simultaneously while maintaining the stack-based scheduling logic within each thread.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent transitions from a single-dimensional sequential execution model to a multi-dimensional parallel execution model by introducing multiple worker threads running concurrently. This dimensional change allows jobs to be executed across multiple cores simultaneously, dramatically improving query optimization productivity.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Productivity

If query optimization jobs are executed sequentially, then resource contention is minimized, but CPU performance from multiple cores is not utilized

Engineering Contradiction:
Improveoptimization throughputVSAvoidjob dependency management
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent introduces a job queue as an intermediary data structure that manages the distribution of jobs to worker threads. The job queue acts as a mediator that coordinates job distribution while maintaining dependency relationships, allowing parallel execution without losing control over job ordering and dependency management.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent implements dynamic job assignment where worker threads dynamically pick up jobs from the shared job queue based on availability and dependency satisfaction. This dynamic approach allows the system to adapt to varying workloads and efficiently utilize available CPU cores while maintaining proper job execution order through dependency tracking.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS10331666B1Apparatus and method for parallel processing of a query
Publication Date: 2019.06.25 VMWARE INC
  • US10331666B1 patent drawing
  • US10331666B1 patent drawing
  • US10331666B1 patent drawing

AI summary

A computer readable storage medium comprises executable instructions to receive a query. A graph is built to represent jobs associated with the query. The jobs are assigned to parallel threads according to the graph.