Dynamic Skew Avoidance for MPP Query Processing

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current database management systems face inefficiencies in dynamically avoiding data skew during query processing, particularly in massively parallel processing systems, leading to slow response times and unbalanced workloads due to lack of accurate hot AMP detection and redistribution mechanisms.

Innovation Solution

The system evaluates query selectivity at a checkpoint to identify overloaded processing modules and stops redistributing skewed rows to them, maintaining these rows locally instead, and implements a redistribution adjustment routine to evenly distribute rows among all modules, without requiring pre-known skewed value statistics.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If hash redistribution is used to join tables in MPP systems, then query processing can be performed in parallel across multiple AMPs, but data skew causes certain AMPs to receive excessive rows resulting in unbalanced workload and slow response time

Engineering Contradiction:
Improvequery processing parallel efficiencyVSAvoidworkload balance across AMPs
Core Design Contradiction:
ProductivityVSEase of operation

Solution Approach 1:

The system dynamically adjusts the redistribution strategy during query execution. It begins with hash redistribution for parallel processing, monitors row distribution across AMPs, and dynamically switches to local retention mode when skew is detected, allowing the system to adapt to actual data distribution patterns rather than relying on static pre-computed statistics

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system implements a feedback mechanism where AMPs report their row receipt counts to the coordinator, which then determines whether to continue redistribution or switch to local retention. This closed-loop control allows the system to respond to actual workload conditions and prevent hot AMP formation based on real-time feedback rather than predictions

Inventive Principle:
Principle #23Feedback

2Quantity of substance

If additional AMPs are added to the system, then overall system capacity increases, but the relative disproportionate distribution of rows to hot AMPs increases reducing parallel efficiency

Engineering Contradiction:
Improvesystem processing capacityVSAvoidparallel efficiency
Core Design Contradiction:
Quantity of substanceVSProductivity

Solution Approach 1:

Each AMP independently determines whether to redistribute or locally retain rows based on its own row receipt count and the system-wide skew detection threshold. This decentralized decision-making allows AMPs to self-adjust their behavior without centralized coordination overhead, maintaining efficiency even as system size changes

Inventive Principle:
Principle #25Self-service

3Adaptability or versatility

If dynamic skew avoidance is implemented without accurate statistics, then the system can handle unknown skewed values, but detection of hot AMPs becomes less accurate potentially causing mistakes

Engineering Contradiction:
Improveability to handle unknown skewed valuesVSAvoidhot AMP detection accuracy
Core Design Contradiction:
Adaptability or versatilityVSMeasurement precision

Solution Approach 1:

The system pre-establishes a skew detection threshold based on the number of AMPs and expected uniform distribution, allowing it to detect skew dynamically without requiring pre-computed statistics. This preliminary configuration enables the system to adapt to unknown skewed values while maintaining detection accuracy through mathematical bounds rather than empirical data

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS8832074B2System, method and computer-readable medium for dynamic skew avoidance for generic queries
Publication Date: 2014.09.09 TERADATA CORP
  • US8832074B2 patent drawing
  • US8832074B2 patent drawing
  • US8832074B2 patent drawing

AI summary

A system, method, and computer-readable medium that facilitate dynamic skew avoidance are provided. The disclosed mechanisms advantageously do not require any statistic information regarding which values are skewed in a column on which a query is applied. Query selectivity is evaluated at a check point and thereby facilitates accurate detection of an overloaded processing module. The successful detection of an overloaded processing module causes other processing modules to stop sending more skewed rows to the overloaded processing module. Detection of an overloaded processing module is made when the overloaded processing module has received more rows than a target number of rows. Further, skewed rows that are maintained locally rather than redistributed to a detected processing module may result in more processing modules becoming overloaded. Advantageously, the disclosed mechanisms provide for a final redistribution adjustment to provide for even distribution of rows among all processing modules.