Database Engine Update Mechanism for Columnar Storage

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Column-oriented database engines face performance bottlenecks during updates due to the need for re-compression of entire data blocks, which adversely affects update performance, especially with large volumes of updates.

Innovation Solution

The method involves allocating primary, secondary, and tertiary data structures, where updates are written to the tertiary structure with storage keys, sorted and merged into the secondary structure for queries, allowing efficient update and query operations without re-compressing the primary data structure, optimizing write and read phases.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If column-oriented database engines use compression to improve read performance and data transfer efficiency, then read performance and data transfer speed are improved, but update performance deteriorates due to the need for re-compression of entire data blocks

Engineering Contradiction:
Improveread performanceVSAvoidupdate performance
Core Design Contradiction:
SpeedVSProductivity

Solution Approach 1:

The patent segments the update process into two independent phases: write phase where updates are appended to the tertiary structure without re-compression, and read phase where updates are sorted and merged into the secondary structure. This segmentation allows compression to be applied only once during initial data loading, while updates are handled separately without triggering re-compression, thus resolving the contradiction between maintaining compression benefits for reads and avoiding re-compression overhead for updates.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary sorting of updated values during the read phase before merging them into the secondary structure. By pre-sorting the update data in memory before the merge operation, the system avoids the need for re-compression during updates, as the sorted data can be efficiently integrated into the compressed secondary structure without decompressing or re-compressing the entire data block.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If the entire compressed data block is re-compressed to update an attribute in a column-oriented database, then data consistency is maintained, but update performance deteriorates significantly

Engineering Contradiction:
Improvedata consistencyVSAvoidupdate performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies local quality by maintaining different data structures for different operational needs: the primary structure stores compressed data for efficient reads, the secondary structure stores sorted updated values, and the tertiary structure stores unsorted update data. Each structure has optimized properties for its specific purpose, allowing updates to be applied locally to the tertiary and secondary structures without affecting the compression of the primary structure, thus maintaining data consistency while avoiding re-compression overhead.

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent creates a copy of the update data in the tertiary structure as a separate data structure from the primary compressed structure. Instead of modifying the primary compressed structure directly (which would require re-compression), the system copies update data to the tertiary structure, then merges it with the secondary structure during reads. This copying approach maintains the integrity and compression of the primary structure while enabling efficient updates.

Inventive Principle:
Principle #26Copying

3Stability of the object's composition

If updates are processed by re-compressing the entire data block in a column-oriented database, then data structure integrity is maintained, but the time required for updates increases

Engineering Contradiction:
Improvedata structure integrityVSAvoidupdate time
Core Design Contradiction:
Stability of the object's compositionVSLoss of time

Solution Approach 1:

The patent implements a dynamic update mechanism where the handling of updated data adapts based on the read phase. During the write phase, updates are simply appended to the tertiary structure without any complex processing. During the read phase, the system dynamically sorts the tertiary structure data and merges it with the secondary structure. This dynamic approach maintains data structure integrity through the merge operation while minimizing update time by avoiding re-compression during the write phase.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentEP2758901B1Mechanism for updates in a database engine
Publication Date: 2016.11.02 RETAIL LOGISTICS EXCELLENCE RELEX
  • EP2758901B1 patent drawingFigure 1~2
  • EP2758901B1 patent drawingFigure 3
  • EP2758901B1 patent drawingFigure 4

AI summary

Method for database processing comprises allocating primary, secondary and tertiary data structures (110A, 120A, 130A) for each column. Columnar content is written into the primary data structure (110). Updated values are written into the tertiary data structure (130B). Storage keys indicate correspondence to the primary data structure (110B). Query responses involve first reading updated values from the tertiary data structure (130B), sorting by storage keys,storing into the secondary data structure (120C), and clearing the tertiary data structure (130C). Then the primary and secondary data structures (110C, 120C) are consulted to respond to the query, reading the value for each row from the secondary data structure where present, otherwise from the primary data structure. A commit phase produces a new version (110D) of the primary data structure by merging the secondary data structure (120C) and an old version (110C) of the primary data structure, consulting them in a similar manner.