Server Mapping Plans for Data Skew in Parallel Query Execution

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing parallel execution techniques in database systems suffer from data skew issues during server mapping, leading to performance degradation due to uneven distribution of workloads among server groups, especially in cases where the number of partitions is smaller than the possible degree of parallelism, resulting in idle groups or overloaded servers.

Innovation Solution

Implement compile-time and runtime solutions to detect skew by adjusting server mapping, using dynamic sampling queries and partition mapping vectors to redistribute workload evenly among server processes, and switching to alternative distribution methods when necessary.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If server mapping is used to increase degree of parallelism, then parallelism is improved, but data skew causes uneven workload distribution leading to performance degradation

Engineering Contradiction:
Improvedegree of parallelismVSAvoidworkload distribution uniformity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements dynamic server mapping where the mapping between partitions and server processes is not fixed but can be adjusted at runtime. The system monitors partition sizes and dynamically remaps partitions to server processes to balance workload distribution, resolving the contradiction between maintaining high parallelism and ensuring uniform workload distribution.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the mapping parameters dynamically based on detected partition skew. When skew is detected, the system modifies the server mapping parameters to redistribute partitions more evenly across server processes, thereby maintaining both high parallelism and workload uniformity.

Inventive Principle:
Principle #35Parameter changes

2Device complexity

If static server mapping is used, then implementation is simple, but performance degrades when partition sizes vary

Engineering Contradiction:
Improveserver mapping implementationVSAvoidquery execution performance
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent transitions from static to dynamic server mapping, allowing the system to adapt to varying partition sizes at runtime. This dynamic approach maintains simplicity in implementation while significantly improving performance under skewed partition conditions.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system incorporates feedback mechanisms where partition size information is collected and used to adjust server mapping. This feedback loop enables the system to maintain optimal performance by adapting to actual partition sizes without complicating the basic mapping implementation.

Inventive Principle:
Principle #23Feedback

3Productivity

If partitions are sub-partitioned to increase parallelism, then degree of parallelism is improved, but overhead increases and customers may prefer hash-based operations

Engineering Contradiction:
Improvedegree of parallelismVSAvoidpartitioning overhead
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

Instead of requiring customers to manually sub-partition data, the system dynamically adjusts server mapping based on existing partition sizes. This eliminates the need for additional sub-partitioning operations while achieving high parallelism, thereby reducing overhead and avoiding the complexity of hash-based redistribution.

Inventive Principle:
Principle #15Dynamics

Data Source

PatentUS12493631B1Handling data skew for parallel execution with server mapping plans
Publication Date: 2025.12.09 ORACLE INT CORP
  • US12493631B1 patent drawing
  • US12493631B1 patent drawing
  • US12493631B1 patent drawing

AI summary

Skew handling techniques are provided in parallel execution for even load balancing and scaling. In a compile-time solution, a dynamic sampling query is issued to detect partition skew. The compile-time solution determines the number of skewed partitions and uses a hybrid distribution scheme where skewed partitions use a random distribution and non-skewed partitions use the original server mapping. In a runtime solution, producer server processes create partition mapping vectors that contain partition mapping information. Each producer server process sends its partition mapping vector to the query coordinator (QC). The QC receives the partition mapping vectors from the producer server processes, merges the vectors, and determines a skew result based on the merged mapping vectors and sends the skew result to the producer server processes. The producer server process can alter distribution of skewed partitions based on the skew result.