Dynamic Filter for Left-Join Aggregation Query Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database query optimizers face inefficiencies when handling left-join aggregation patterns, particularly due to reliance on outdated statistical data and requiring substantial manual effort for implementation.

Innovation Solution

The implementation of a dynamic filter within the query engine that identifies specific patterns in user queries, particularly those involving large outer tables and join operations with inner tables, automatically rewriting the query to filter rows earlier in the join operation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Extent of automation

If traditional cost-based query optimizers are used, then query performance may be maintained at acceptable levels, but the optimizers rely on outdated statistical data and require substantial manual effort for implementation

Engineering Contradiction:
Improvequery optimization automationVSAvoidoptimization accuracy
Core Design Contradiction:
Extent of automationVSReliability

Solution Approach 1:

The patent implements a dynamic filter that automatically adapts to different query patterns and data distributions in real-time, replacing static statistical data with live query execution characteristics. This dynamic approach enables the optimizer to automatically adjust filtering strategies based on actual runtime performance without requiring manual reconfiguration or outdated statistical information.

Inventive Principle:
Principle #15Dynamics

2Productivity

If manual optimization techniques are used, then query performance can be tuned, but substantial manual effort is required for implementation and maintenance

Engineering Contradiction:
Improvequery execution efficiencyVSAvoidimplementation complexity
Core Design Contradiction:
ProductivityVSEase of operation

Solution Approach 1:

The dynamic filter performs self-optimization by automatically analyzing query execution patterns and adjusting filtering strategies without human intervention. The system monitors query performance metrics and autonomously modifies optimization parameters, eliminating the need for manual tuning while maintaining high query execution efficiency.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The system incorporates feedback mechanisms that continuously monitor query execution performance and use this information to refine future optimization decisions. By leveraging actual runtime performance data, the dynamic filter automatically adjusts its filtering strategies to achieve optimal query performance without requiring manual intervention.

Inventive Principle:
Principle #23Feedback

3Quantity of substance

If aggregation operations are performed on large tables, then comprehensive data processing is achieved, but processing time and resource consumption increase significantly

Engineering Contradiction:
Improvedata processing volumeVSAvoidquery execution time
Core Design Contradiction:
Quantity of substanceVSLoss of time

Solution Approach 1:

The dynamic filter applies preliminary filtering actions before aggregation operations execute, pre-filtering rows based on predicted aggregation patterns and data characteristics. This preliminary action reduces the effective data volume processed during aggregation, significantly decreasing execution time and resource consumption while maintaining comprehensive data processing capabilities.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The optimization strategy applies different filtering intensities and strategies to different parts of the data based on local characteristics. The dynamic filter analyzes data distributions and query patterns to apply targeted filtering only where necessary, rather than uniformly processing all data, thereby reducing overall processing time while maintaining required data processing volume.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS20250156418A1Techniques to improve query performance using dynamic filtering based on left-join aggregation pattern
Publication Date: 2025.05.15 WORKDAY INC
  • US20250156418A1 patent drawing
  • US20250156418A1 patent drawing
  • US20250156418A1 patent drawing

AI summary

In some implementations, the techniques described herein relate to a method including: receiving, by a query engine, a database query, the database query including an inner query having inner query conditions and an outer query having outer query conditions; determining, by the query engine, that a number of rows responsive to the outer query exceeds a threshold; determining, by the query engine, that the inner query conditions and the outer query conditions are correlated; rewriting, by the query engine, the inner query conditions to include at least one of the outer query conditions to generate an optimized query; and executing, by the query engine, the optimized query on a database.