# US 2026/0064689 A1 · Special handling of task sizes for interpreted code with high overhead

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2026/0064689 A1
- Document ID: US20260064689A1
- Status: Published application
- Kind: A1
- Application number: 18/817,012
- Filed: 2024-08-27
- Published: 2026-03-05
- Earliest claimed: 2024-08-27
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Christina Teflioudi; Paul Willems; Marius Eich
- Web page: https://patentgrep.com/patent/US20260064689A1

## CPC

- G06F 16/24545: {Selectivity estimation or determination}
- G06F 11/302: {where the computing system component is a software system}
- G06F 11/3409: {for performance assessment}
- G06F 16/24532: {of parallel queries}
- G06F 16/24542: {Plan optimisation}
- G06F 16/24549: {Run-time optimisation}
- G06F 2201/80: Database-specific techniques
- G06F 2201/865: Monitoring of software
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

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.

## Claims

### Claim 1

A computer-implemented method comprising:
generating a query execution plan for a received query, wherein the query execution plan comprises one or more operators which will be interpreted by an interpreter when the query execution plan is executed;
determining an overhead associated with preparation of the interpreter for executing the one or more operators of the query execution plan;
determining a preferred task size based on removing the overhead associated with preparation of the interpreter; and
during execution of the query execution plan, assigning tasks to one or more worker threads, wherein a task size of each assigned task is determined based on the preferred task size.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, further comprising removing the overhead from an overall sampling measurement associated with the query execution plan.

### Claim 3 (depends on 2)

The computer-implemented method of claim 2, further comprising determining the preferred task size based on removing the overhead from the overall sampling measurement associated with the query execution plan.

### Claim 4 (depends on 2)

The computer-implemented method of claim 2, further comprising determining a cost per row metric based on a number of rows processed during a sampling interval after removing the overhead from the overall sampling measurement.

### Claim 5 (depends on 4)

The computer-implemented method of claim 4, further comprising determining the preferred task size based on the cost per row metric.

### Claim 6 (depends on 4)

The computer-implemented method of claim 4, further comprising determining the preferred task size based on a value of a cost per task configuration parameter divided by the cost per row metric.

### Claim 7 (depends on 6)

The computer-implemented method of claim 6, wherein the preferred task size is determined such that the overhead is a given percentage of the preferred task size.

### Claim 8 (depends on 7)

The computer-implemented method of claim 7, wherein the given percentage is in a range between 5% and 15%.

### Claim 9 (depends on 7)

The computer-implemented method of claim 7, wherein the given percentage is applied only to parallelization points where the interpreter is being used and where code corresponding to the one or more operators will never get just-in-time compiled.

### Claim 10 (depends on 1)

The computer-implemented method of claim 1, wherein the one or more operators will not be just-in-time compiled during execution of the query execution plan.

### Claim 11

A system comprising:
at least one processor; and
at least one memory storing instructions that, when executed by the at least one processor, cause operations comprising:
generating a query execution plan for a received query, wherein the query execution plan comprises one or more operators which will be interpreted by an interpreter when the query execution plan is executed;
determining an overhead associated with preparation of the interpreter for executing the one or more operators of the query execution plan;
determining a preferred task size based on removing the overhead associated with preparation of the interpreter; and
during execution of the query execution plan, assigning tasks to one or more worker threads, wherein a task size of each assigned task is determined based on the preferred task size.

### Claim 12 (depends on 11)

The system of claim 11, wherein the operations further comprise removing the overhead from an overall sampling measurement associated with the query execution plan.

### Claim 13 (depends on 12)

The system of claim 12, wherein the operations further comprise determining the preferred task size based on removing the overhead from the overall sampling measurement associated with the query execution plan.

### Claim 14 (depends on 12)

The system of claim 12, wherein the operations further comprise determining a cost per row metric based on a number of rows processed during a sampling interval after removing the overhead from the overall sampling measurement.

### Claim 15 (depends on 14)

The system of claim 14, wherein the operations further comprise determining the preferred task size based on the cost per row metric.

### Claim 16 (depends on 14)

The system of claim 14, wherein the operations further comprise determining the preferred task size based on a value of a cost per task configuration parameter divided by the cost per row metric.

### Claim 17 (depends on 16)

The system of claim 16, wherein the preferred task size is determined such that the overhead is a given percentage of the preferred task size.

### Claim 18 (depends on 17)

The system of claim 17, wherein the given percentage is in a range between 5% and 15%.

### Claim 19 (depends on 17)

The system of claim 17, wherein the given percentage is applied only to parallelization points where the interpreter is being used and where code corresponding to the one or more operators will never get just-in-time compiled.

### Claim 20

A non-transitory computer readable medium storing instructions, which when executed by at least one data processor, result in operations comprising:
generating a query execution plan for a received query, wherein the query execution plan comprises one or more operators which will be interpreted by an interpreter when the query execution plan is executed;
determining an overhead associated with preparation of the interpreter for executing the one or more operators of the query execution plan;
determining a preferred task size based on removing the overhead associated with preparation of the interpreter; and
during execution of the query execution plan, assigning tasks to one or more worker threads, wherein a task size of each assigned task is determined based on the preferred task size.
