Query Processing Apparatus Merging Streams for SQL Aggregates

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Query processing with multiple distinct aggregates, cube, rollup, and grouping sets leads to increased memory usage and the risk of distributed deadlock due to the proportional increase in the number of streams and operations required, resulting in higher costs and inefficiencies.

Innovation Solution

A query processing apparatus and method that processes SQL queries with multiple distinct aggregates, cube, or grouping sets operations by performing a predetermined number of group by operations, maintaining intermediate results in a single stream, and limiting resources needed, thereby avoiding distributed deadlocks.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If multiple distinct aggregates, cube, rollup, and grouping sets operations are processed by maintaining separate streams for each operation, then query processing capability is improved, but memory usage increases proportionally with the number of operations

Engineering Contradiction:
Improvequery processing capabilityVSAvoidmemory usage
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The patent merges multiple separate processing streams into a single unified stream. Instead of maintaining distinct streams for each aggregate operation (cube, rollup, grouping sets), the system processes all operations through one shared stream, thereby reducing memory consumption while preserving the ability to handle diverse query types.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The single processing stream is designed to be universal, capable of handling multiple types of aggregate operations (distinct aggregates, cube, rollup, and grouping sets) through a unified processing mechanism. This multi-functional approach eliminates the need for separate specialized streams for each operation type.

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

2Measurement precision

If the number of streams and group by or join operations increases proportionally with the number of distinct aggregates, then query accuracy is improved, but device complexity increases

Engineering Contradiction:
Improvequery accuracyVSAvoidnumber of operations
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

Multiple group by and join operations that were previously executed separately for each aggregate type are merged into a unified processing sequence. The single stream approach consolidates these operations, reducing the total number of discrete operations while maintaining query accuracy through systematic processing of all aggregates in one pass.

Inventive Principle:
Principle #5Merging (Combining)

3Reliability

If separate streams are maintained for each aggregate operation, then processing completeness is improved, but the risk of distributed deadlock increases

Engineering Contradiction:
Improveprocessing completenessVSAvoiddistributed deadlock risk
Core Design Contradiction:
ReliabilityVSObject-affected harmful factors

Solution Approach 1:

The patent eliminates distributed deadlock risk by merging multiple independent streams into a single coordinated stream. This unified approach removes the synchronization conflicts and resource contention issues that arise when multiple streams operate independently, thereby eliminating the harmful factor of distributed deadlock while maintaining processing completeness.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS10180960B2Query processing
Publication Date: 2019.01.15 ROCKET SOFTWARE
  • US10180960B2 patent drawing
  • US10180960B2 patent drawing
  • US10180960B2 patent drawing

AI summary

A method for query processing includes receiving a query, and determining a query type by determining if the query is a structured query language (SQL) query including multiple distinct aggregates (MDAs), or a SQL query including cube, rollup or grouping sets operations. Based on the determination, the method includes processing the query to generate an output, and performing a predetermined number of maximum group by operations on the output based on the query type to generate a response to the query.