In-Memory Cursor Duration Temp Tables for Database Query Performance

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In multi-node database systems, storing temporary tables on shared disk leads to significant overhead due to allocation overhead and slower disk access compared to volatile memory, causing delays during query processing, especially for small results.

Innovation Solution

Storing cursor duration temporary tables in local volatile memory of nodes, where each node allocates memory segments for writer and reader threads to process and share temporary data, reducing the need for disk access and merging delays.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If temporary tables are stored on shared disk, then data can be shared across multiple nodes, but access speed decreases and overhead increases

Engineering Contradiction:
Improvedata sharing capabilityVSAvoidaccess speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The patent divides the temporary table storage into multiple segments distributed across different nodes. Each node stores a portion of the temporary table in its local memory, allowing parallel access while maintaining data sharing capabilities. This segmentation eliminates the single-point bottleneck of shared disk storage.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent transitions from a centralized shared disk storage model to a distributed in-memory storage model across multiple nodes. By adding the dimension of distributed memory storage, the system achieves both fast local access and data sharing through inter-node communication.

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

2Reliability

If temporary tables are stored on shared disk, then data persistence is maintained, but allocation overhead increases

Engineering Contradiction:
Improvedata persistenceVSAvoidallocation overhead
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent pre-allocates memory segments for temporary table storage on each node before query execution begins. This preliminary allocation eliminates the need for dynamic allocation during query processing, reducing overhead and improving efficiency.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent creates copies of temporary table data across multiple nodes in memory. Instead of allocating and managing a single shared disk storage location, the system replicates data copies on each node, eliminating complex allocation and sharing logic.

Inventive Principle:
Principle #26Copying

3Productivity

If worker threads write to shared disk segments, then parallel processing is enabled, but merging delays occur

Engineering Contradiction:
Improveparallel processing capabilityVSAvoidmerging delay
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent divides the temporary table into multiple segments distributed across different nodes, allowing worker threads to write to local segments in parallel without requiring centralized merging. Each node independently manages its segment, eliminating the serial merge bottleneck.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts the merging operation from the system by allowing each node to independently write to its own segment. The segments are already in their final positions, eliminating the need for a separate merging step that causes delays.

Inventive Principle:
Principle #2Taking out (Extraction)

4Quantity of substance

If disk-based temporary tables are used, then storage capacity is sufficient, but read/write performance decreases

Engineering Contradiction:
Improvestorage capacityVSAvoidread/write performance
Core Design Contradiction:
Quantity of substanceVSSpeed

Solution Approach 1:

The patent changes the storage medium parameter from disk-based to in-memory storage. By transitioning from magnetic/disk storage to volatile memory, the system achieves dramatically faster read/write performance while maintaining sufficient storage capacity for temporary tables.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS10452655B2In-memory cursor duration temp tables
Publication Date: 2019.10.22 ORACLE INT CORP
  • US10452655B2 patent drawing
  • US10452655B2 patent drawing
  • US10452655B2 patent drawing

AI summary

Techniques are provided herein for processing a query using in-memory cursor duration temporary tables. The techniques involve storing a part of the temporary table in memory of nodes in a database cluster. A part of the temporary table may be stored in disk segments of nodes in the database cluster. Writer threads running on a particular node writes data for the temporary table to the memory of the particular node. Excess data may be written to the disk segment of the particular node. Reader threads running on the particular node reads data for the temporary table from the memory of the particular node and the disk segment of the particular node.