Disjunct Trees for Complex Aggregate Expression Matching

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing query rewrite mechanisms in database management systems lack the ability to match complex aggregate expressions due to their inability to utilize the distributive property of algebraic operators, leading to inefficient query processing in data warehousing and decision support systems.

Innovation Solution

The proposed solution involves generating and storing disjunct trees for aggregate expressions in materialized views and queries, allowing for the use of algebraic properties like distributivity to rewrite queries that reference materialized views efficiently, thereby matching complex aggregate expressions and reducing the need for frequent base table access.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Device complexity

If query rewrite mechanisms use only associative and commutative properties for matching aggregate expressions, then the matching mechanism is simple to implement, but it cannot match complex aggregate expressions that specify arbitrary numbers of aggregate functions and operators

Engineering Contradiction:
Improvematching mechanism complexityVSAvoidaggregate expression matching capability
Core Design Contradiction:
Device complexityVSAdaptability or versatility

Solution Approach 1:

The patent segments aggregate expressions into individual disjuncts (separate terms or components) and represents them using disjunct trees. This segmentation allows the query rewrite mechanism to break down complex aggregate expressions into manageable units that can be matched individually, enabling support for arbitrary numbers of aggregate functions and operators while maintaining systematic processing.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces a new dimensional representation by using disjunct trees to represent aggregate expressions. Instead of relying solely on linear algebraic properties (associative and commutative), the disjunct tree structure adds a hierarchical dimension that captures the nested and compositional nature of complex aggregate expressions, enabling more comprehensive matching capabilities.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Ease of operation

If query rewrite mechanisms support only simple algebraic properties, then the mechanism is easy to operate, but it lacks the ability to match complex aggregate expressions with arbitrary aggregate functions and operators

Engineering Contradiction:
Improvequery rewrite operation simplicityVSAvoidcomplex aggregate expression matching
Core Design Contradiction:
Ease of operationVSAdaptability or versatility

Solution Approach 1:

By segmenting aggregate expressions into disjuncts and representing them with disjunct trees, the patent maintains operational simplicity through systematic tree traversal and comparison algorithms while simultaneously gaining the ability to handle complex aggregate expressions with arbitrary functions and operators.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The disjunct tree serves as an intermediary representation between the original aggregate expression and the matching process. This intermediary structure simplifies the matching operation by providing a standardized format for comparison while enabling the system to handle complex expressions that would otherwise be difficult to process directly.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If the system performs full aggregation operations on base tables, then accurate results are obtained, but query execution time becomes unacceptably long when the data warehouse contains very large amounts of data

Engineering Contradiction:
Improvequery result accuracyVSAvoidquery execution time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent enables query rewrite mechanisms to identify and use materialized views that contain pre-computed aggregated data. By performing aggregation operations in advance and storing results in materialized views, the system can rewrite queries to retrieve pre-aggregated data instead of performing full aggregation on base tables, significantly reducing query execution time while maintaining result accuracy.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS7877376B2Supporting aggregate expressions in query rewrite
Publication Date: 2011.01.25 ORACLE INT CORP
  • US7877376B2 patent drawing
  • US7877376B2 patent drawing
  • US7877376B2 patent drawing

AI summary

In one embodiment, a plurality of materialized views is stored, where each view includes a set of aggregate expressions. Storing each materialized view comprises identifying one or more disjuncts in the set of aggregate expressions, generating a set of disjunct trees that represent the set of aggregate expressions, and storing the set of disjunct trees. When a query that requests aggregated data is received, one or more disjuncts are identified in an aggregate expression specified in the query. A disjunct tree for the disjuncts in the query is generated. Based on the disjunct tree for the query and on the set of disjunct trees for each materialized view, a particular materialized view is determined from the plurality of materialized views. The query is rewritten into an equivalent query that references the particular materialized view, where the equivalent query would retrieve the requested aggregated data from the particular materialized view.