Distinct Aggregate Query Translation for Database Performance

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Queries containing distinct aggregates in database systems often suffer from performance issues due to high memory usage and processing time, especially in distributed environments like the cloud, where each distinct aggregate must be computed separately for each category, leading to inefficiencies.

Innovation Solution

A system and method that translates queries with distinct aggregates into queries without distinct aggregates by creating records for each distinct aggregate attribute, allowing for non-distinct aggregation, thereby reducing memory usage and processing time by leveraging optimized base aggregation support.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If distinct aggregate operations are computed separately for each category in distributed environments, then accurate distinct aggregation results are obtained, but memory usage and processing time increase significantly

Engineering Contradiction:
Improveaggregation accuracyVSAvoidprocessing time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent segments the distinct aggregate computation into two phases: first computing non-distinct aggregates for all records, then performing a secondary aggregation to derive distinct values. This segmentation allows the system to leverage efficient non-distinct aggregation algorithms while still achieving accurate distinct aggregation results, thereby reducing processing time without sacrificing accuracy.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary non-distinct aggregation computations for all records before computing the final distinct aggregate results. By pre-computing these intermediate non-distinct aggregates, the system avoids the need to compute distinct aggregates separately for each category, significantly reducing overall processing time while maintaining result accuracy.

Inventive Principle:
Principle #10Preliminary action

2Measurement precision

If distinct aggregate operations are computed separately for each category in distributed environments, then accurate distinct aggregation results are obtained, but memory usage increases significantly

Engineering Contradiction:
Improveaggregation accuracyVSAvoidmemory usage
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent segments memory usage into two efficient phases: storing intermediate non-distinct aggregate results, then using these results to compute final distinct aggregates. This segmentation avoids the need to load all category data into memory simultaneously, reducing peak memory usage while preserving aggregation accuracy.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent uses intermediate non-distinct aggregate results as a copy or proxy for the actual distinct aggregation computation. By working with these intermediate results rather than the original large dataset, the system achieves accurate distinct aggregation with significantly reduced memory requirements.

Inventive Principle:
Principle #26Copying

3Adaptability or versatility

If multiple distinct aggregates are computed in a query, then comprehensive analytical results are obtained, but each aggregate must be computed separately leading to inefficiency

Engineering Contradiction:
Improvequery capabilityVSAvoidcomputation efficiency
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent merges the computation of multiple distinct aggregates by computing all necessary non-distinct aggregates in a single pass through the data. This unified approach allows the system to derive multiple distinct aggregate results from the same intermediate computations, significantly improving productivity while maintaining comprehensive query capabilities.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The intermediate non-distinct aggregate results serve multiple purposes: they are used to compute any number of distinct aggregates for different categories. This universal intermediate representation enables the system to efficiently respond to diverse query requirements without re-computing data, enhancing both versatility and efficiency.

Inventive Principle:
Principle #6Universality (Multi-functionality)

4Adaptability or versatility

If distinct aggregates are computed in distributed environments, then queries can be executed across distributed data storage, but the plurality of data storage options exacerbates performance issues

Engineering Contradiction:
Improvedistributed environment supportVSAvoidquery performance
Core Design Contradiction:
Adaptability or versatilityVSProductivity

Solution Approach 1:

The patent performs preliminary non-distinct aggregation computations across distributed data storage nodes before consolidating results to compute final distinct aggregates. This preliminary action at the distributed level reduces data transfer requirements and allows each node to contribute efficiently, improving overall query performance while maintaining distributed environment support.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS10503731B2Efficient analysis of distinct aggregations
Publication Date: 2019.12.10 INTERNATIONAL BUSINESS MACHINE CORPORATION
  • US10503731B2 patent drawing
  • US10503731B2 patent drawing
  • US10503731B2 patent drawing

AI summary

Embodiments relate to aggregation operations. More specifically, embodiments relate to translating a query involving a distinct aggregate(s) into a query that does not involve a distinct aggregate. The translation involves a transformation effectively rewriting the original query containing the distinct aggregate including removal of the distinct aggregate from the query. The translated query enables the query to perform a non-distinct aggregation that effectively provides the results of the removed distinct aggregate(s).