In-Memory Data Processing Grouping for Database Query Pipelining

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database operations often require significant time and resources due to the need to materialize outputs from local memory to non-local memory, which is slower and inefficient, especially when dealing with large volumes of data.

Innovation Solution

The system optimizes database operations by grouping them to enable pipelining within local memory, using a compiler-driven approach that models memory usage and applies heuristics to determine optimal query plans, thereby reducing the need for materialization and improving execution efficiency.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If database operations are processed using non-local storage, then more data can be stored, but processing speed decreases

Engineering Contradiction:
Improvedata storage capacityVSAvoidprocessing speed
Core Design Contradiction:
Quantity of substanceVSSpeed

Solution Approach 1:

The patent segments database operations into groups that can be processed independently in local memory. Each group of operations is executed as a unit that fits within the limited local memory capacity, allowing fast processing of segments while the overall query processes larger datasets by chaining multiple segments together.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system performs preliminary actions by pre-grouping operations and pre-allocating local memory buffers before execution. The compiler analyzes the query plan and organizes operations into memory-efficient groups in advance, so that during execution, data can be processed quickly in local memory without repeated allocations or spills to non-local storage.

Inventive Principle:
Principle #10Preliminary action

2Speed

If all operations are fitted into local memory, then processing speed increases, but local memory capacity is exceeded

Engineering Contradiction:
Improveprocessing speedVSAvoiddata volume
Core Design Contradiction:
SpeedVSQuantity of substance

Solution Approach 1:

The patent divides the database query plan into multiple operator groups, where each group is sized to fit within local memory constraints. This segmentation allows the system to process large volumes of data by breaking them into manageable chunks that can be handled quickly in local memory, with intermediate results spilled to non-local storage only when necessary.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The system introduces a new dimension of operation grouping and memory management by organizing operations into hierarchical groups with associated local and non-local buffers. This multi-level memory organization allows efficient processing of large datasets by managing data flow between local and non-local storage across multiple operation groups simultaneously.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

3Productivity

If operations are grouped into tasks for local memory processing, then in-memory processing efficiency increases, but task grouping complexity increases

Engineering Contradiction:
Improvein-memory processing efficiencyVSAvoidtask grouping complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The compiler performs preliminary analysis and grouping of operations during query compilation, before execution. It examines the query plan, estimates memory requirements for each operation, and automatically groups operations into tasks that will fit within local memory. This pre-processing eliminates the need for complex runtime decisions about grouping, simplifying the execution phase while maximizing in-memory processing efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The system uses feedback from memory usage analysis to dynamically adjust operation grouping. The compiler estimates the memory footprint of each operation and uses this feedback to determine optimal groupings that maximize local memory utilization. This feedback-driven approach allows the system to adapt to different query patterns and memory configurations without requiring manual tuning or complex runtime complexity.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS10366124B2Dynamic grouping of in-memory data processing operations
Publication Date: 2019.07.30 ORACLE INT CORP
  • US10366124B2 patent drawing
  • US10366124B2 patent drawing
  • US10366124B2 patent drawing

AI summary

Techniques are described herein for grouping of operations in local memory of a processing unit. The techniques involve adding a first operation for a first leaf operator of a query execution plan to a first pipelined group. The query execution plan includes a set of leaf operators and a set of non-leaf operators. Each leaf operator of the set of one or more leaf operators has a respective parent non-leaf operator and each non-leaf operator has one or more child operators from among the set of leaf operators or others of the set of non-leaf operators. The techniques further involve determining a memory requirement of executing the first operation for the first leaf operator and executing a second operation for the respective parent non-leaf operator of the first leaf operator. The output of the first operation is input to the second operation. The techniques further involve determining whether the memory requirement is satisfied by an amount of local memory. If it is determined that the memory requirement is satisfied by the amount of local memory the second operation for the respective parent non-leaf operator is added to the first pipelined group. The techniques further involve assigning the first pipelined group to a first thread and the first thread executing the first pipelined group. Executing the first pipelined group involves: storing first output of the first operation in the local memory of the first thread; using the first output as input for the second operation; storing second output of the second operation in the local memory; and moving second output from the local memory to a tier of memory different than the local memory relative to the first thread.