Multi-Column Histogram Generation via Set-Theoretic Superset Materialization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Single and multi-column histogram generation in SQL compilers is computationally expensive and results in high disk I/O overhead, affecting query plan quality and performance.

Innovation Solution

The approach identifies multi-column groups as supersets to establish parent-child relationships, reducing disk I/O overhead by optimizing the generation of histograms through a set-theoretic approach, which minimizes logical and physical disk I/O operations.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If traditional histogram generation methods are used in SQL compilers, then histograms can be generated for data distribution analysis, but the process is computationally expensive with high disk I/O overhead

Engineering Contradiction:
Improveselectivity estimation accuracyVSAvoidhistogram generation speed
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent segments the histogram generation process into distinct phases: data collection, processing, and output generation. By dividing the work into manageable segments and processing them separately, the system reduces the computational burden on any single phase and improves overall generation efficiency while maintaining accurate selectivity estimation.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements preliminary action by pre-collecting and pre-processing data before actual histogram generation. Statistics are gathered in advance during normal database operations, and this pre-collected data is then used to efficiently generate histograms when needed, significantly reducing the computational cost at query time while preserving accuracy.

Inventive Principle:
Principle #10Preliminary action

2Reliability

If comprehensive histogram data is collected for accurate selectivity estimation, then query plan quality improves, but disk I/O overhead increases

Engineering Contradiction:
Improvequery plan qualityVSAvoiddisk I/O overhead
Core Design Contradiction:
ReliabilityVSLoss of energy

Solution Approach 1:

The patent merges multiple statistical measurements into a unified histogram structure that captures data distribution characteristics efficiently. By combining various statistical metrics (counts, sums, distinct values) into a single integrated histogram object, the system achieves comprehensive analysis with reduced redundant I/O operations compared to collecting separate statistics for each metric.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent uses copying by creating simplified representations of data distributions through histogram buckets. Instead of storing or repeatedly accessing the actual voluminous data, the system creates compact copied representations that capture essential distribution characteristics, enabling accurate selectivity estimation with minimal disk I/O overhead.

Inventive Principle:
Principle #26Copying

3Measurement precision

If detailed data processing is performed for histogram generation, then measurement accuracy improves, but processing overhead increases

Engineering Contradiction:
Improvedata distribution accuracyVSAvoidprocessing complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent applies parameter changes by transforming raw data into histogram parameters (bucket boundaries, frequencies, densities) that capture data distribution essence. By changing the representation parameters from individual data points to aggregated statistical parameters, the system maintains measurement accuracy while significantly reducing processing complexity and computational requirements.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS11693889B2Effective materialization strategy utilizing statistical set-theoretic approach for generation of multi-interval multi-column histogram and histograms in general
Publication Date: 2023.07.04 HEWLETT PACKARD ENTERPRISE DEV LP
  • US11693889B2 patent drawing
  • US11693889B2 patent drawing
  • US11693889B2 patent drawing

AI summary

Various aspects of the subject technology relate to methods, systems, and machine-readable media for generating histograms according to a set-theoretic approach. The method includes receiving a command to generate at least one histogram from selected data, the selected data comprising a plurality of column groups. The method also includes identifying a superset from the plurality of column groups. The method also includes materializing, in a memory, a superset multi-column group for the superset. The method also includes identifying at least one subset of the superset from the plurality of column groups, the at least one subset comprising at least one column group. The method also includes processing the at least one subset of the superset to form a grouped resultset. The method also includes generating the at least one histogram for the grouped resultset of the at least one subset of the superset.