Parallelizing Unpartitioned Window Functions via Range Segmentation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing window functions in database systems are not effectively parallelized when they are unpartitioned, leading to underutilization of parallel processing capabilities, as they rely on the PARTITION BY clause for parallelization, which may not always align with the system's degree of parallelism.

Innovation Solution

The technique involves partitioning the work of qualifying window functions into ranges and sharing precomputed aggregate values between computational elements, allowing for parallelization without relying on partitioning criteria specified in the command, enabling parallel execution of unpartitioned window functions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If window functions rely on PARTITION BY clause for parallelization, then parallel processing capability is improved, but unpartitioned window functions cannot be parallelized effectively

Engineering Contradiction:
Improveparallel processing capabilityVSAvoidapplicability to unpartitioned window functions
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent segments the work of window functions into independent range-based partitions, allowing each partition to be processed separately by different computational elements. This enables parallelization by dividing the overall computation into smaller, concurrently executable units without requiring PARTITION BY clause in the original query.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary actions by precomputing aggregate values for each range partition before final window function computation. This preliminary aggregation enables subsequent parallel processing by providing preprocessed data that reduces the computational burden during the main execution phase.

Inventive Principle:
Principle #10Preliminary action

2Ease of operation

If partitioning is based on PARTITION BY clause, then data distribution is simplified, but the degree of parallelism may not align with system capabilities

Engineering Contradiction:
Improvedata distribution simplicityVSAvoiddegree of parallelism
Core Design Contradiction:
Ease of operationVSProductivity

Solution Approach 1:

The patent dynamically adjusts the partitioning strategy by allowing range-based divisions that can be customized to match the system's available computational resources. This dynamic approach enables the degree of parallelism to be tuned independently of the data's natural partitioning characteristics, optimizing resource utilization.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent introduces a new dimension for partitioning by using range-based divisions on ordering keys rather than relying solely on the PARTITION BY clause dimensions. This additional partitioning dimension provides flexibility to achieve desired parallelism levels by combining multiple partitioning strategies.

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

3Reliability

If unpartitioned window functions are executed serially, then computational accuracy is maintained, but processing speed is reduced

Engineering Contradiction:
Improvecomputational accuracyVSAvoidprocessing speed
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The patent introduces an intermediary mechanism using range table queues that coordinate data flow between parallel computational elements. This intermediary structure ensures that intermediate aggregate values are correctly computed and shared across partitions, maintaining computational accuracy while enabling parallel execution through structured data exchange.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS8315980B2Parallel execution of window functions
Publication Date: 2012.11.20 ORACLE INT CORP
  • US8315980B2 patent drawing
  • US8315980B2 patent drawing
  • US8315980B2 patent drawing

AI summary

Techniques are described for parallelizing qualifying window functions without reliance on partitioning criteria specified in the command that includes the qualifying window functions. Because the techniques do not rely on partitioning criteria specified in the command, the techniques may be used on commands in which no partitioning criteria is specified. In general, the techniques involve partitioning the work of a qualified window function into ranges, and sharing precomputed aggregate values between computational elements to calculate the value for the window functions.