Column Sketch Indexing for Fast Predicate Evaluation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database indexing methods, such as B-trees and early pruning techniques, fail to significantly improve scan performance across various selectivity levels and data distributions, particularly due to inefficiencies in data access and predicate evaluation, especially when data does not exhibit clustering properties or has low selectivity.

Innovation Solution

The introduction of a 'column sketch' indexing scheme that applies lossy compression to map base data values to smaller code values in an auxiliary sketched column, allowing predicate evaluation primarily in the sketched column, thereby reducing data access and improving CPU efficiency and scan performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Speed

If traditional secondary indices such as B-trees are used to localize data access, then data access is improved for low selectivity predicates, but scan performance deteriorates and memory access patterns become inefficient due to gaps and non-contiguous data retrieval

Engineering Contradiction:
Improvedata access speedVSAvoidscan performance
Core Design Contradiction:
SpeedVSProductivity

Solution Approach 1:

The patent creates a copy of the base column data in a compressed format (dictionary encoding) that preserves the ability to evaluate predicates. This compressed copy allows efficient scanning without accessing the full base data, resolving the contradiction between fast data access and high scan performance.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent changes the parameter of data representation from full-precision base values to compressed code values. This parameter change enables both fast predicate evaluation (through code comparison) and efficient scanning (through contiguous memory access), while maintaining the ability to accurately evaluate predicates through the compression map.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If early pruning techniques such as Bit-Slicing are used to decompose predicates, then data skipping is improved for informative high order bits, but performance deteriorates when data exhibits skew and high order bits provide little pruning

Engineering Contradiction:
Improvepredicate evaluation speedVSAvoidperformance consistency across data distributions
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent performs preliminary compression of the base column into a dictionary-encoded format before predicate evaluation. This preliminary action creates a compact representation that enables efficient scanning and predicate evaluation regardless of data distribution characteristics, making the performance consistent across different data scenarios.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts only the essential information needed for predicate evaluation into a compressed format. By storing only the compression map and compressed column rather than the full base data, the system achieves fast evaluation without being affected by data skew issues that plague bit-slicing methods.

Inventive Principle:
Principle #2Taking out (Extraction)

3Productivity

If lossy compression is applied to map base data to smaller code values, then data movement is reduced and CPU efficiency is improved, but some precision is lost in the compressed representation

Engineering Contradiction:
ImproveCPU efficiencyVSAvoiddata representation accuracy
Core Design Contradiction:
ProductivityVSMeasurement precision

Solution Approach 1:

The patent creates a compressed copy of the base column that preserves predicate evaluation accuracy. The compression map stores the mapping from code values to base values, allowing the system to work with compact code values during scanning while maintaining the ability to accurately evaluate predicates by referencing the compression map when needed.

Inventive Principle:
Principle #26Copying

Data Source

PatentUS11397712B2Rapid and robust predicate evaluation
Publication Date: 2022.07.26 PRESIDENT & FELLOWS OF HARVARD COLLEGE
  • US11397712B2 patent drawing
  • US11397712B2 patent drawing
  • US11397712B2 patent drawing

AI summary

Various approaches for accelerating data access to a computer memory and predicate evaluation includes storing, in the computer memory, (i) base data as multiple base columns, (ii) multiple sketched columns each corresponding to a base column in the base data and having smaller code values compared thereto, and (iii) a compression map for mapping one or more base columns to the corresponding sketched column; applying the compression map to a query having a predicate; determining data on the sketched column that satisfies the predicate; and evaluating the predicate based at least in part on the determined data on the sketched column without accessing the base column in the base data.