Compiled Call Stubs for Faster Polyglot Database Queries

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database management systems face inefficiencies in processing polyglot queries due to the lack of direct compatibility and slow adaptation between different languages, leading to increased computational burden and network latency.

Innovation Solution

The generation, reuse, and partial evaluation of a wrapper for invoking user-defined stored subroutines, combined with dynamic detection of acceleration thresholds and iterative data type conversion, optimize query execution for bulk data processing in a polyglot database management system.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If adaption between different languages is performed in a polyglot database system, then language compatibility is improved, but execution speed deteriorates

Engineering Contradiction:
Improvelanguage compatibilityVSAvoidexecution speed
Core Design Contradiction:
Adaptability or versatilityVSSpeed

Solution Approach 1:

The patent applies preliminary action by generating and compiling wrapper subroutines in advance before actual query execution. The wrapper generation process creates optimized code templates that are compiled into machine code beforehand, so that when polyglot queries need to invoke user-defined subroutines across different languages, the adaptation work has already been done, eliminating runtime overhead and improving execution speed while maintaining language compatibility

Inventive Principle:
Principle #10Preliminary action

2Productivity

If wrapper generation and compilation is performed for each query, then execution efficiency is improved, but computational overhead increases

Engineering Contradiction:
Improveexecution efficiencyVSAvoidcomputational overhead
Core Design Contradiction:
ProductivityVSUse of energy by moving object

Solution Approach 1:

The system performs wrapper generation and compilation in advance during a preliminary phase, creating optimized execution templates before actual query processing. This preliminary action moves the computationally intensive work to a setup phase rather than executing it repeatedly for each query, thereby improving runtime execution efficiency while managing computational overhead through one-time preparation

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent uses copying by generating wrapper subroutines as templates that can be reused across multiple queries. Instead of generating unique wrapper code for each query, the system creates master wrapper templates that are copied and instantiated for different user-defined subroutines, reducing redundant computational work while maintaining execution efficiency for each specific query

Inventive Principle:
Principle #26Copying

Data Source

PatentUS20250335442A1Compiled call stubs for efficient execution of polyglot queries in a dbms
Publication Date: 2025.10.30 ORACLE INT CORP
  • US20250335442A1 patent drawing
  • US20250335442A1 patent drawing
  • US20250335442A1 patent drawing

AI summary

Here is query acceleration for a polyglot database by generation, reuse, partial evaluation, and compilation of a wrapper for invoking a user-defined stored subroutine that is defined by source logic text for an imperative language such as JavaScript. A database server receives a structured query language (SQL) statement that references a user-defined subroutine that is defined in the imperative language. Also defined in the imperative language, a wrapper subroutine is responsively generated. The wrapper subroutine specifies a datatype conversion for a parameter for the user-defined subroutine. Executing the SQL statement entails executing the wrapper subroutine, including executing the user-defined subroutine. Execution of the user-defined subroutine is unconventionally accelerated by logic generation that can be conditioned on database metrics, including just in time (JIT) compilation, and further accelerated by highly contextual partial evaluation.