Predicate-Weighted Histogram Generation for Database Query Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Database management systems face inefficiencies in generating histograms for large data sets, leading to suboptimal query performance due to inaccurate representation of data distribution, especially when the number of buckets is capped, resulting in information loss and increased query processing time.

Innovation Solution

A system and method for generating weighted histograms by capturing query predicate literals, calculating weight vectors, and merging histogram rows based on cost functions that consider information loss and predicate weights, thereby optimizing the number of buckets and improving data distribution representation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If the number of histogram buckets is increased to improve data distribution representation, then measurement precision is improved, but device complexity increases

Engineering Contradiction:
Improvedata distribution representation accuracyVSAvoidhistogram structure complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent changes the parameter of histogram bucket weights by introducing predicate-based weighting. Instead of uniform buckets, each bucket is assigned a weight reflecting its importance to query predicates. This allows fewer buckets to achieve better representation accuracy by concentrating resolution on predicate-relevant regions while maintaining manageable complexity.

Inventive Principle:
Principle #35Parameter changes

2Device complexity

If the number of histogram buckets is capped to reduce device complexity, then device complexity is reduced, but measurement precision deteriorates

Engineering Contradiction:
Improvehistogram structure complexityVSAvoiddata distribution representation accuracy
Core Design Contradiction:
Device complexityVSMeasurement precision

Solution Approach 1:

The patent applies local quality by making different histogram buckets have different weights based on predicate relevance. Buckets corresponding to frequently queried predicate values receive higher weights and finer resolution, while less important buckets have lower weights. This non-uniform quality distribution achieves accurate representation with fewer total buckets.

Inventive Principle:
Principle #3Local quality

3Device complexity

If traditional histograms are used without predicate weighting, then device complexity is reduced, but loss of information increases

Engineering Contradiction:
Improvehistogram generation complexityVSAvoidquery performance information
Core Design Contradiction:
Device complexityVSLoss of information

Solution Approach 1:

The patent performs preliminary action by pre-calculating predicate weights and incorporating them into histogram generation. The system analyzes query predicates in advance, determines which data regions are most relevant, and weights histogram buckets accordingly before query execution. This preliminary weighting prevents information loss by ensuring critical data regions are accurately represented.

Inventive Principle:
Principle #10Preliminary action

4Loss of information

If predicate-weighted histograms are generated to reduce information loss, then loss of information is reduced, but device complexity increases

Engineering Contradiction:
Improvequery performance informationVSAvoidhistogram generation complexity
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The patent applies self-service by having the histogram generation process automatically analyze query predicates and determine optimal bucket weights without manual intervention. The system services itself by using its own query workload information to configure its internal representation, reducing information loss while managing complexity through automation rather than manual tuning.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11669519B2System for generating predicate-weighted histograms
Publication Date: 2023.06.06 SOLARWINDS WORLDWIDE LLC
  • US11669519B2 patent drawing
  • US11669519B2 patent drawing
  • US11669519B2 patent drawing

AI summary

Embodiments of the present invention provide a method, computer program-product, and system for generating predicate-weighted histograms in a database management system. Further, the methods, computer program-products and systems in accordance with the present invention generate histograms that are biased towards the predicate literals of the queries that are submitted to the database management system. The resulting histograms will improve query performance by generating histograms with greater resolution near predicate literals that represent the queries submitted to the database management system.