In-Memory Expression Units Cache Query Results

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database queries with complex expressions consume significant system resources due to repeated computations, and existing solutions like materialized views do not capture intermediary expression results or internal computations that reside solely in memory during query execution.

Innovation Solution

Implementing in-memory expression units (IMEUs) and internal units (IMIUs) to cache and store results of frequently used expressions and computations, allowing database servers to access cached results instead of re-evaluating them, thereby reducing resource consumption and improving query performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If materialized views are used to capture query results, then query performance is improved, but intermediary expression results and internal computations are not captured

Engineering Contradiction:
Improvequery performanceVSAvoidintermediary expression results
Core Design Contradiction:
ProductivityVSLoss of information

Solution Approach 1:

The patent segments the query execution process into distinct components: materialized views for final results and expression units for intermediary computations. This segmentation allows each component to serve its specific function - materialized views handle final query results while expression units capture and reuse intermediate computation results, thereby resolving the contradiction between improving query performance and preserving intermediary information.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces expression units as intermediary components between the query processor and materialized views. These expression units act as mediators that capture, store, and manage intermediary computation results, enabling the system to both improve query performance through caching and preserve intermediary expression results that would otherwise be lost.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Adaptability or versatility

If complex expressions are evaluated repeatedly, then query flexibility is maintained, but system resources are significantly consumed

Engineering Contradiction:
Improvequery flexibilityVSAvoidsystem resources
Core Design Contradiction:
Adaptability or versatilityVSUse of energy by moving object

Solution Approach 1:

The patent applies preliminary action by pre-computing and caching complex expressions in expression units before they are needed for actual query execution. When queries are executed, the system first checks the expression units for pre-computed results, thereby maintaining query flexibility while significantly reducing the computational resources required for repeated complex expression evaluations.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent changes the state of complex expressions from being dynamically computed to being pre-computed and cached. By transforming expressions into cached computational artifacts in expression units, the system maintains the ability to handle flexible queries while reducing the energy and resource consumption associated with repeated evaluation of the same complex expressions.

Inventive Principle:
Principle #35Parameter changes

3Speed

If in-memory units are created to cache expression results, then query execution speed is improved, but memory usage increases

Engineering Contradiction:
Improvequery execution speedVSAvoidmemory usage
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The patent makes expression units universal by designing them to handle multiple types of intermediary computations and serve multiple query operations. Rather than creating dedicated memory structures for each specific expression or query, the expression units provide a multi-functional caching mechanism that serves various query types and computation needs, thereby improving query execution speed while optimizing memory usage through shared resources.

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

Data Source

PatentUS11238039B2Materializing internal computations in-memory to improve query performance
Publication Date: 2022.02.01 ORACLE INT CORP
  • US11238039B2 patent drawing
  • US11238039B2 patent drawing
  • US11238039B2 patent drawing

AI summary

Techniques are described for materializing computations in memory. In an embodiment, responsive to a database server instance receiving a query, the database server instance identifies a set of computations for evaluation during execution of the query. Responsive to identifying the set of computations, the database server instance evaluates at least one computation in the set of computations to obtain a first set of computation results for a first computation in the set of computations. After evaluating the at least one computation, the database server instance stores, within an in-memory unit, the first set of computation results. The database server also stores mapping data that maps a set of metadata values associated with the first computation to the first set of computation results.