User-Defined Function Execution on Database Tuples

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional user-defined function frameworks in databases invoke scalar functions once per tuple of input, leading to inefficiencies and performance concerns due to high overhead, especially when dealing with large volumes of data.

Innovation Solution

Implementing a mechanism to invoke user-defined scalar functions once for multiple tuples, allowing them to handle and compute results for multiple input tuples simultaneously, and optimizing the evaluation of these functions on run-length encoded data without decompression, as well as using analysis functions to eliminate unnecessary evaluations based on function properties.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If user-defined scalar functions are invoked once per tuple, then each tuple can be processed individually, but the overhead of function calls becomes excessively high when dealing with large volumes of data

Engineering Contradiction:
Improvequery execution speedVSAvoidfunction call overhead
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent merges multiple function calls into a single invocation by enabling user-defined scalar functions to process multiple tuples simultaneously. The database system passes multiple input tuples to the function in one call, and the function returns multiple results, thereby reducing the total number of function calls from N (where N is the number of tuples) to a much smaller number of calls.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent implements multi-functionality by allowing a single user-defined scalar function to handle multiple tuples rather than requiring separate function calls for each tuple. This universal approach enables the function to process batches of data, making it more efficient for large datasets while maintaining the same functional behavior for individual tuples.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Reliability

If functions are evaluated on all input data, then complete results are obtained, but unnecessary evaluations consume computational resources when function properties allow elimination

Engineering Contradiction:
Improveresult completenessVSAvoidcomputational resources
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent applies preliminary action by using analysis functions to examine function properties and determine in advance whether a user-defined function needs to be evaluated for particular input data. The analysis function checks conditions such as whether the function should be eliminated based on its properties, and only evaluates the function when necessary, thereby avoiding unnecessary computational resources while ensuring complete results when evaluation is required.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8805811B2Executing user-defined function on a plurality of database tuples
Publication Date: 2014.08.12 ROCKET SOFTWARE
  • US8805811B2 patent drawing
  • US8805811B2 patent drawing
  • US8805811B2 patent drawing

AI summary

A method for executing a user-defined function on a plurality of input database tuples. The method may include causing a processor to invoke the function once; and to compute results of the function for the plurality of database tuples.