Pipeline Dependent Tree Query Optimizer for Parallel Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional query processing engines face inefficiencies due to extensive memory load and store operations, and lack of cost information, which limits optimization and parallel execution in query processing.

Innovation Solution

The method involves extracting multiple pipelines from a query plan tree, identifying dependencies between them, and generating a pipeline-dependent tree for execution by multiple processors, allowing for cost-based optimization and high inter-pipeline parallelism.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional query plan trees are executed with multiple operators, then query processing can be performed, but extensive memory load and store operations occur consuming significant resources and time

Engineering Contradiction:
Improvequery processing speedVSAvoidmemory resource consumption
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent combines multiple operators into a single fused execution unit (pipeline) that processes data in one continuous pass. Instead of executing separate operators with intermediate memory operations, the join operator, filter operators, and other transformations are merged into one unified code block that processes rows continuously without materializing intermediate results, thereby eliminating extensive memory load and store operations.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The fused pipeline enables continuous processing of data rows through all operators in a single pass. The execution unit maintains continuous action by processing input rows through multiple operators sequentially without stopping to materialize intermediate results, keeping the data flow continuous and avoiding the stop-start nature of traditional operator execution with memory I/O between each operator.

Inventive Principle:
Principle #20Continuity of useful action

2Loss of energy

If operators are fused into a single pipeline for efficient execution, then resource consumption is reduced, but cost information is lost making optimization difficult

Engineering Contradiction:
Improveresource consumptionVSAvoidcost information
Core Design Contradiction:
Loss of energyVSLoss of information

Solution Approach 1:

The system performs preliminary cost analysis during the code generation phase, before the fused pipeline is executed. The code generator analyzes the query plan tree, estimates costs for different operator orderings and pipeline configurations, and uses this cost information to optimize the fusion strategy. This preliminary action preserves cost information availability while still enabling efficient fused execution.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system incorporates feedback mechanisms where execution statistics and actual performance data from fused pipelines are collected and fed back to the code generator. This feedback loop allows the system to learn from actual runtime behavior and refine cost models, enabling better optimization decisions in subsequent code generation iterations while maintaining efficient fused execution.

Inventive Principle:
Principle #23Feedback

3Productivity

If code generation creates native code for fused operators, then execution efficiency is improved, but execution is limited to a strictly bottom-up manner

Engineering Contradiction:
Improveexecution efficiencyVSAvoidexecution flexibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The system dynamically determines execution strategies based on the specific query plan and cost considerations. Rather than being locked into a fixed bottom-up execution order, the code generator can produce fused pipelines that execute operators in optimized orders, and the system can adaptively choose between different execution modes (fused pipeline vs. traditional operator execution) based on query characteristics and available resources.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The query plan is segmented into logical pipelines that can be executed in flexible orders. The system identifies natural pipeline boundaries where data materialization is necessary, allowing independent pipelines to be executed in parallel or in different sequences. This segmentation enables execution flexibility while maintaining the efficiency benefits of fused operators within each pipeline segment.

Inventive Principle:
Principle #1Segmentation

4Adaptability or versatility

If traditional query processing uses multiple virtual function calls for each operator, then operator execution is flexible, but significant time is consumed due to extensive memory operations

Engineering Contradiction:
Improveoperator execution flexibilityVSAvoidquery processing time
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

Multiple operator executions that would traditionally require separate virtual function calls are merged into a single fused execution unit. The join operator, filter operators, and other transformations are combined into one continuous code block that processes data rows in a single pass, eliminating the overhead of repeated function calls and intermediate memory operations between each operator execution.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The fused pipeline maintains continuous data flow through all operators without interruption for memory I/O. Data rows are processed continuously through the join operation, filter operations, and other transformations in a single uninterrupted pass, eliminating the stop-start execution pattern of traditional operators that require materializing intermediate results to memory between each operation.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS10671607B2Pipeline dependent tree query optimizer and scheduler
Publication Date: 2020.06.02 FUTUREWEI TECHNOLOGIES INC
  • US10671607B2 patent drawing
  • US10671607B2 patent drawing
  • US10671607B2 patent drawing

AI summary

A method includes traversing a query plan tree having multiple nodes, each node representative of an operation on data that is the subject of a query, to extract multiple pipelines from the query plan tree, identify dependencies between the multiple extracted pipelines, and provide a pipeline dependent tree based on the dependencies between the multiple extracted pipelines for execution of the query by multiple processors.