Adaptive Early Filtering Below Joins for Top-K Queries

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing query plans for database operations, particularly those involving a join operation followed by a top K sort, are inefficient due to the processing of unnecessary elements that cannot fulfill the command, leading to wasted processing cycles.

Innovation Solution

Implementing an early filter with intra-pipeline predicate back-propagation, where a dynamic variable is introduced to push a filter operation below the join operation, allowing for efficient pruning and reducing unnecessary processing by filtering out elements before they reach the join operation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If a standard query plan is used with join operation followed by top K sort, then the query can be executed, but unnecessary elements are processed leading to wasted processing cycles

Engineering Contradiction:
Improvequery execution efficiencyVSAvoidprocessing cycles
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent applies preliminary action by pushing the filter operation down to the join node, where it filters elements before they are fully processed through the pipeline. The filter uses a dynamic variable (threshold value) to preemptively eliminate elements that cannot contribute to the top K result, performing the filtering action in advance before unnecessary processing occurs

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent segments the query execution pipeline by introducing a dynamic filter operation that operates independently at the join node. This segmentation allows the filter to work in parallel with the join operation, separating the filtering function from the subsequent sort operation and enabling independent optimization of each segment

Inventive Principle:
Principle #1Segmentation

2Productivity

If filtering is applied early in the pipeline below the join operation, then processing cycles are reduced, but a dynamic variable and filter operation must be introduced into the query plan

Engineering Contradiction:
Improveprocessing cycle efficiencyVSAvoidquery plan structure
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements feedback by using a dynamic variable that is updated with threshold values from the sort operation and fed back to the filter operation at the join node. This feedback mechanism allows the filter to adapt its filtering criteria based on the current state of the sort, creating a closed-loop control system that optimizes filtering effectiveness

Inventive Principle:
Principle #23Feedback

Solution Approach 2:

The patent applies dynamics by making the filter operation dynamic rather than static. The filter's threshold value changes adaptively during query execution based on the sort operation's progress, allowing the filter to adjust its behavior in real-time to match the evolving requirements of the top K sort operation

Inventive Principle:
Principle #15Dynamics

3Reliability

If all elements are passed through the join operation, then completeness is maintained, but processing time increases due to handling elements that cannot fulfill the command

Engineering Contradiction:
Improvequery result completenessVSAvoidprocessing time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent performs preliminary filtering at the join node before elements are passed to the sort operation. By evaluating the filter condition using the dynamic threshold variable in advance, the system eliminates ineligible elements before they consume processing time in subsequent operations, while still guaranteeing that all potentially qualifying elements are processed

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent extracts and removes elements that cannot possibly contribute to the top K result by applying the filter operation at the join node. This extraction eliminates unnecessary elements from the processing pipeline early, preventing them from consuming time in subsequent sort and output operations while maintaining completeness of valid results

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS12461914B1Adaptive early filtering with intra-pipeline predicate back-propagation
Publication Date: 2025.11.04 SAP SE
  • US12461914B1 patent drawing
  • US12461914B1 patent drawing
  • US12461914B1 patent drawing

AI summary

In an example embodiment, an early filter is applied with a query plan using intra-pipeline predicate back-propagation. Specifically, the query plan may be thought of as a pipeline of operations. A runtime variable var may be introduced, and a specialized filter using var may be pushed down below the join operation. Var is a dynamic variable that is updated to track a value from the sort or similar operation (such as max (heap), reflecting the maximum value of a max-heap used by the sort or similar operation). The runtime variable gets initialized once the heap reaches a minimum number of elements (such as K in the case of a top K sort). Thus, before the heap reaches that minimum number of elements, the filter does not apply. Once the heap does reach that minimum number of elements, the filter does apply and acts to filter elements. Since the filter has been pushed down below the join operation, this saves processing cycles.