Query Task Sizing for High-Overhead Interpreted Operators

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database management systems face challenges in optimizing query performance due to high interpreter overhead, especially in handling complex queries and large volumes of queries, which affect transaction time and computational efficiency.

Innovation Solution

A database execution engine employs a balanced approach by using an interpreter for fast queries and just-in-time compilation for compute-intensive queries, while dynamically adjusting task sizes based on interpreter overhead during a sampling phase to minimize runtime delays.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If an interpreter is used to execute query operators, then query execution flexibility and ease of operation are improved, but execution speed and productivity deteriorate due to high interpreter overhead

Engineering Contradiction:
Improvequery execution flexibilityVSAvoidquery execution speed
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The system dynamically adapts the execution mode for query operators based on runtime conditions. Some operators are executed by an interpreter while others are executed by compiled native code, allowing the system to optimize performance while maintaining flexibility. This dynamic approach resolves the contradiction by making the execution method adjustable rather than fixed.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the execution parameter (interpreter vs. native code) for different operators based on their characteristics and overhead requirements. By analyzing interpreter overhead for each operator and adjusting the execution mode accordingly, the system achieves both flexibility and performance optimization.

Inventive Principle:
Principle #35Parameter changes

2Loss of time

If task size is reduced to minimize interpreter overhead, then execution time for individual tasks is improved, but total query processing time worsens due to increased task management overhead

Engineering Contradiction:
Improveinterpreter overhead timeVSAvoidoverall query processing efficiency
Core Design Contradiction:
Loss of timeVSProductivity

Solution Approach 1:

The system determines optimal task sizes by analyzing interpreter overhead characteristics and adjusting task parameters accordingly. For operators with high interpreter overhead, the system modifies task size parameters to minimize the impact of overhead while maintaining overall processing efficiency.

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The system uses sampling queries to measure interpreter overhead and uses this feedback to optimize task size decisions. The overhead information gathered from sampling feeds back into the task allocation mechanism, allowing the system to make informed decisions about task sizing that balance overhead reduction with processing efficiency.

Inventive Principle:
Principle #23Feedback

3Measurement precision

If sampling queries are executed to determine interpreter overhead, then task allocation accuracy is improved, but additional query execution time is incurred

Engineering Contradiction:
Improveoverhead measurement accuracyVSAvoidsampling execution time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system executes sampling queries with a limited scope (processing only a portion of the total data) to obtain overhead measurements. This partial execution provides sufficient information for task allocation decisions without incurring the full cost of executing complete sampling queries for every operator, thus balancing measurement accuracy with time consumption.

Inventive Principle:
Principle #16Partial or excessive action

Data Source

PatentUS20260064689A1Special handling of task sizes for interpreted code with high overhead
Publication Date: 2026.03.05 SAP SE
  • US20260064689A1 patent drawing
  • US20260064689A1 patent drawing
  • US20260064689A1 patent drawing

AI summary

A database execution engine generates query execution plan for a received query, where the query execution plan includes one or more operators which will be interpreted by an interpreter when the query execution plan is executed. A query execution engine determines an overhead associated with preparation of the interpreter for executing the one or more operators of the query execution plan. Also, the query execution engine determines a preferred task size based on removing the overhead associated with preparation of the interpreter. During execution of the query execution plan, the query execution engine assigns tasks to one or more worker threads, where a task size of each assigned task is determined based on the preferred task size.