Dynamic Operation Compilation for Parallel Query Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database systems face inefficiencies in executing dynamically generated operations due to the overhead of interpreting code, which slows down processing and wastes resources when parallelization is attempted with uncompiled operations.

Innovation Solution

A mixed execution model is implemented, where dynamically generated operations are executed sequentially until a threshold is reached, then compiled to precompiled code, allowing parallel execution based on measured execution times, optimizing task sizes, and managing worker threads efficiently.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Loss of energy

If dynamically generated operations are executed sequentially using an interpreter, then resource wastage is minimized during initial execution, but processing speed is slow

Engineering Contradiction:
Improveresource wastageVSAvoidprocessing speed
Core Design Contradiction:
Loss of energyVSSpeed

Solution Approach 1:

The system performs preliminary sequential execution of dynamically generated operations to collect performance data and determine optimal task sizes before transitioning to parallel execution. This preliminary phase prepares the system by measuring execution times and establishing baseline metrics that guide subsequent parallelization decisions.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system dynamically adjusts execution strategy based on measured performance characteristics. Task sizes and parallelization parameters are not fixed but are determined through empirical measurement during sequential execution, allowing the system to adapt to actual workload characteristics and optimize performance accordingly.

Inventive Principle:
Principle #15Dynamics

2Productivity

If parallelization is attempted with uncompiled interpreted operations, then throughput may be increased, but execution overhead increases and performance degrades

Engineering Contradiction:
ImprovethroughputVSAvoidexecution overhead
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system performs preliminary sequential execution to measure performance characteristics before parallelization. This allows determination of optimal task sizes and execution parameters in advance, preventing the system from attempting parallelization with suboptimal configurations that would increase overhead without providing throughput benefits.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system uses feedback from sequential execution measurements to guide parallelization decisions. Execution times and performance metrics collected during the sequential phase inform the configuration of parallel tasks, ensuring that parallelization is applied in a way that actually improves throughput rather than increasing overhead.

Inventive Principle:
Principle #23Feedback

3Speed

If precompiled code is generated after threshold executions, then execution efficiency is improved through parallelization, but compilation time is introduced as a delay

Engineering Contradiction:
Improveexecution efficiencyVSAvoidcompilation time
Core Design Contradiction:
SpeedVSLoss of time

Solution Approach 1:

The system allows the dynamically generated operation to execute sequentially for a threshold number of times before initiating compilation. This preliminary execution phase utilizes the time that would otherwise be spent on compilation productively, gathering performance data and reducing the impact of compilation delay on overall execution time.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system maintains continuous useful action by allowing sequential execution to proceed during the compilation preparation phase. Rather than stopping execution to compile, the system continues to execute operations sequentially while preparing for parallelization, ensuring that useful work is performed throughout the entire process.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS12547622B2Dynamically generated operations in a parallel processing framework
Publication Date: 2026.02.10 SAP SE
  • US12547622B2 patent drawing
  • US12547622B2 patent drawing
  • US12547622B2 patent drawing

AI summary

A method for executing a dynamically generated operation in a parallel processing framework may include executing the dynamically generated operation sequentially for a threshold quantity of times before initiating a compilation operation to generate precompiled code for the dynamically generated operation. Upon generating the precompiled code, execution of the precompiled code may be parallelized by determining, based on a quantity of time required to execute the precompiled code on a portion of a dataset, a task size. The execution of the precompiled code may be divided, based on the task size, into one or more tasks. Moreover, a corresponding quantity of worker threads may be allocated to perform the one or more tasks in parallel. Related methods and computer program products are also provided.