Bitmap Condition Evaluator for Negated Database Queries
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing database query systems are inefficient in evaluating negated conditions within conjunctions and disjunctions, leading to high computational costs due to the need to traverse and compare all rows in a table, especially when using bitmap-based indexing.
Innovation Solution
The implementation of a condition evaluator that utilizes restriction bitmaps to restrict the scope of negated condition evaluations within conjunctions and satisfaction bitmaps to restrict the scope of negated condition evaluations within disjunctions, reducing the number of rows to be evaluated and thereby lowering computational costs.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If bitmap-based indexing is used to accelerate database queries, then query evaluation speed is improved, but the system does not apply bitmap-based conditions to negated conditions, leaving computational efficiency unoptimized
Solution Approach 1:
The patent extends bitmap-based condition evaluation to handle both positive and negated conditions uniformly. The condition evaluator is designed to accept negated conditions and generate appropriate bitmaps (e.g., using bitwise NOT operations on existing bitmaps), making the bitmap mechanism universally applicable to all condition types rather than limited to positive conditions only.
2Measurement precision
If direct comparison of each cell to a value is performed, then accurate row identification is achieved, but computational cost increases significantly
Solution Approach 1:
The patent pre-computes bitmaps for each column value during data insertion or indexing, storing which rows contain which values in bitmap form. When evaluating conditions (including negated conditions), the system retrieves these pre-computed bitmaps and performs efficient bitwise operations rather than comparing each cell value, thereby reducing computational cost while maintaining accurate row identification.
Solution Approach 2:
The patent creates bitmap representations (copies) of row membership information for each distinct value in a column. Instead of directly comparing cell values during query evaluation, the system uses these bitmap copies to determine row membership through efficient bitwise operations, significantly reducing the computational effort required for accurate row identification.
3Productivity
If bitmap-based conditions are used for disjunctions, then evaluation efficiency is improved, but negated conditions within disjunctions are not optimized, leaving performance gaps
Solution Approach 1:
The condition evaluator is designed to handle negated conditions within disjunctions by generating bitmaps for the negated condition and applying appropriate bitwise operations. For a disjunction like (A OR NOT B), the system evaluates bitmaps for both A and NOT B, then combines them using bitwise OR, extending the bitmap-based optimization to work universally across all logical operators including negated conditions in disjunctions.
Data Source
AI summary
Disclosed herein are system, method, and computer program product embodiments for accelerating database queries containing bitmap-based conditions. An embodiment operates by determining a bitmap, where the bitmap represents a set of rows that have satisfied a conjunct that precedes a negated condition in a query expression and restricting the evaluation of the negated condition to the set of rows represented by the bitmap.


