Aligned Run-Length Encoding for Database Query Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing run-length encoding (RLE) techniques face inefficiencies in predicate comparison and row lookup due to the need for costly exception handling and variable run lengths, which impact query processing efficiency in database systems.

Innovation Solution

Aligned Run-Length Encoding (ARLE) enforces fixed intervals between runs, eliminating the need for exception handling during predicate comparison and using an offset array for efficient row lookup, ensuring that each run fits within a processor word and allowing direct calculation of run intervals for rapid row access.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Quantity of substance

If traditional run-length encoding is used to compress data, then storage space is reduced, but query processing efficiency deteriorates due to exception handling overhead

Engineering Contradiction:
Improvestorage spaceVSAvoidquery processing efficiency
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

The patent segments the run-length encoded data into fixed-size intervals that align with processor word boundaries. Each interval contains a fixed number of runs, and the encoding structure is organized so that predicate comparisons can be performed on complete intervals without crossing word boundaries, eliminating the need for exception handling.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the parameter of run length from variable to fixed by enforcing that each run fits within a predetermined interval size. This parameter change allows the system to use fixed-size data structures and eliminates dynamic boundary checking, improving query processing efficiency while maintaining compression ratios.

Inventive Principle:
Principle #35Parameter changes

2Quantity of substance

If variable run lengths are used in RLE, then compression efficiency is improved, but row lookup complexity increases due to cumulative run length calculations

Engineering Contradiction:
Improvecompression efficiencyVSAvoidrow lookup complexity
Core Design Contradiction:
Quantity of substanceVSDevice complexity

Solution Approach 1:

The patent divides the data into fixed-size intervals containing a predetermined number of runs each. This segmentation allows row lookup to be performed by first determining which interval contains the row and then performing a simplified search within that interval, reducing the overall complexity compared to searching through all runs in variable-length encoding.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent pre-calculates and stores metadata about each interval, including the starting position and run count. This preliminary action enables the system to quickly locate the relevant interval for any given row without performing cumulative calculations across all previous runs, significantly simplifying the row lookup process.

Inventive Principle:
Principle #10Preliminary action

3Reliability

If exception handling is implemented for overflow during predicate comparison, then correctness is maintained, but processing time increases

Engineering Contradiction:
ImprovecorrectnessVSAvoidprocessing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent prevents overflow exceptions from occurring in the first place by designing the encoding structure so that each run is guaranteed to fit within a processor word. The fixed interval size is chosen to be a multiple of the word size, and runs are constrained to fit within intervals, eliminating the need for runtime overflow checking while maintaining correctness.

Inventive Principle:
Principle #9Preliminary anti-action

Solution Approach 2:

The patent changes the parameter of run length to be bounded by the processor word size. This parameter constraint ensures that no run will ever overflow a word boundary, allowing predicate comparisons to be performed using simple fixed-width operations without complex exception handling logic.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS9665611B2Techniques for aligned run-length encoding
Publication Date: 2017.05.30 ORACLE INT CORP
  • US9665611B2 patent drawing
  • US9665611B2 patent drawing
  • US9665611B2 patent drawing

AI summary

Techniques for Aligned Run-Length Encoding (ARLE) are described. ARLE is an encoding scheme that transforms sets of same-valued consecutive rows into one or more runs, while enforcing boundaries between the runs at set intervals (e.g. every predetermined number of rows). Consecutive rows that contain the same value, but which cross one or more interval boundaries, are encoded as multiple runs that are divided along those interval boundaries. According to one technique, a database server accelerates query processing by setting the interval size to the word size of the processor performing the predicate comparisons. According to another technique, a database server accelerates row lookup by maintaining an offset array that stores the run offsets into the ARLE data of the run that begins each interval.