Compile Time Opcodes for Database Query Bind Variable Context

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In database applications, the processing of bind variables is expensive due to the need to re-determine metadata at runtime, which was not captured during compilation, leading to significant performance overhead.

Innovation Solution

Gathering and storing usage context information at compile time as interpretable opcodes in the shared query context, allowing the execution engine to retrieve bind values efficiently during runtime by performing operations associated with the captured context information.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If bind processing is performed at runtime without capturing context information at compile time, then the system can handle dynamic queries, but the runtime processing cost increases significantly due to re-determining metadata

Engineering Contradiction:
Improvedynamic query handlingVSAvoidruntime processing cost
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent captures context information about bind variables at compile time, including metadata such as data types, lengths, and usage patterns. This preliminary action stores the context in the execution plan, eliminating the need to re-determine this information at runtime, thus reducing processing costs while maintaining dynamic query handling capabilities

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent segments the bind processing into two phases: compile-time context capture and runtime execution. By separating the metadata determination from the actual query execution, the system prepares necessary information in advance, allowing runtime to focus only on executing with the captured context, thereby reducing overall runtime overhead

Inventive Principle:
Principle #1Segmentation

2Productivity

If context information is captured at compile time, then runtime performance improves, but the compile time processing and execution plan size increase

Engineering Contradiction:
Improveruntime performanceVSAvoidexecution plan size
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent extracts only the essential context information about bind variables from the full query metadata, storing only what is necessary for efficient runtime execution. This selective extraction avoids bloatting the execution plan with unnecessary information, maintaining compact plan sizes while still achieving performance improvements

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies context capture selectively to bind variables that actually require it, rather than capturing metadata for all query elements. This localized approach ensures that only relevant portions of the query plan are expanded with context information, minimizing the overall increase in execution plan complexity

Inventive Principle:
Principle #3Local quality

3Adaptability or versatility

If bind variable metadata is re-determined at runtime, then the system can adapt to different execution contexts, but the dispatch overhead increases significantly

Engineering Contradiction:
Improveexecution context adaptationVSAvoiddispatch overhead
Core Design Contradiction:
Adaptability or versatilityVSLoss of time

Solution Approach 1:

The patent performs preliminary capture of bind variable context information at compile time, including data types, lengths, and usage patterns. This pre-captured context is stored in the execution plan, allowing the runtime engine to dispatch operations without re-determining metadata, thus reducing dispatch overhead while maintaining adaptability through the use of the captured context

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS7912835B2Compile time opcodes for efficient runtime interpretation of variables for database queries and DML statements
Publication Date: 2011.03.22 ORACLE INT CORP
  • US7912835B2 patent drawing
  • US7912835B2 patent drawing
  • US7912835B2 patent drawing

AI summary

A method system and program for performing a query in which context and information including opcodes accompanies an execution plan for the query. The opcodes determine operations to retrieve a set of bind variables. The execution plan and context information shared by a plurality of application programs.