Function-Based Indexes for Non-Deterministic Database Queries

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database systems face challenges in efficiently indexing non-deterministic functions, which generate different output values for the same input values over time, leading to inconsistent query results and reduced performance.

Innovation Solution

The implementation of function-based indexes in database systems that maintain indexed data for non-deterministic functions by forming and updating data structures based on input and output variables, using a dictionary table to track changes and update the indexed data accordingly.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If function-based indexes are used for non-deterministic functions, then query performance is improved, but index consistency and reliability deteriorate due to different output values for same input over time

Engineering Contradiction:
Improvequery performanceVSAvoidindex consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system pre-calculates and stores output values for all possible input combinations in an index structure before queries are executed. This preliminary action allows the database to quickly retrieve pre-computed results rather than executing the non-deterministic function during query processing, thereby improving performance while maintaining consistency through deterministic index generation.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system transforms the non-deterministic function into a deterministic indexing operation by changing the parameters: instead of evaluating the function with variable inputs at query time, the function is evaluated once during index creation with all possible input values, and the results are stored in a structured format that can be efficiently queried.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If indexed data is maintained for non-deterministic functions, then query throughput is enhanced, but data update complexity increases due to tracking changes in underlying data classes

Engineering Contradiction:
Improvequery throughputVSAvoidindex maintenance complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The system implements a feedback mechanism where the database monitor continuously tracks changes in the underlying data classes and automatically triggers index updates when changes are detected. This feedback loop ensures the indexed data remains synchronized with the source data without requiring manual intervention, thereby managing complexity through automation.

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The index maintenance process is made self-service through automated monitoring and update mechanisms. The system automatically detects changes in underlying data, re-evaluates the non-deterministic function with updated inputs, and refreshes the index structure without external intervention, reducing operational complexity.

Inventive Principle:
Principle #25Self-service

3Measurement precision

If comprehensive indexed data is formed for all input variable combinations, then query accuracy is improved, but storage requirements and processing time during index creation increase

Engineering Contradiction:
Improvequery result accuracyVSAvoidindex creation time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The system segments the index creation process into manageable stages: first identifying all unique input value combinations from the data, then evaluating the non-deterministic function for each combination, and finally organizing results into the index structure. This segmentation allows for better resource management and potential parallelization, reducing overall creation time while maintaining comprehensive coverage.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS11372843B2Function-based indexes in database systems
Publication Date: 2022.06.28 ORACLE INT CORP
  • US11372843B2 patent drawing
  • US11372843B2 patent drawing
  • US11372843B2 patent drawing

AI summary

A database system provided according to an aspect of the present disclosure provides indexed data for non-deterministic functions. In an embodiment, a request to maintain an indexed data for a non-deterministic function is received. The non-deterministic function specifies a set of input variables and a set of output variables and a manner in which respective output values are generated for the set of output variables based on corresponding input values for the input variables. Generating output values entails performing operations defined based on a set of data classes in the database system. An indexed data is formed, indicating corresponding output values for respective set of input values present in the set of data classes in the database system. The indexed data is updated when a change to data elements of a first data class of the set of data classes is processed.