Hash Table Skewed Value Deduplication in Parallel Database Queries
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Massively parallel processing systems face performance bottlenecks due to data skew in DISTINCT and aggregation queries, where highly skewed values lead to repetitive redistribution of rows, causing system inefficiencies.
Innovation Solution
Each processing module in the system maintains a hash table of skewed attribute values, allowing it to discard or redistribute rows based on the presence of these values, thereby alleviating bottlenecks and improving query processing efficiency.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If hash redistribution is applied to all rows in DISTINCT queries, then duplicate values are removed correctly, but system bottlenecks occur due to repetitive redistribution of highly skewed values
Solution Approach 1:
The system applies different processing strategies to different data categories: skewed values are handled through local hash table deduplication at each processing module, while non-skewed values undergo traditional hash redistribution. This local quality differentiation resolves the contradiction by optimizing the common case (skewed values) locally without compromising the correctness handling of all cases.
Solution Approach 2:
The system performs preliminary identification of skewed values using statistics or sampling before executing the DISTINCT query. This preliminary action allows the system to prepare hash tables in advance and avoid repetitive redistribution of known skewed values, thereby improving throughput while maintaining correctness.
2Stability of the object's composition
If traditional hash redistribution is used for all attribute values, then data is evenly distributed across processing modules, but highly skewed values cause system bottlenecks due to repetitive redistribution
Solution Approach 1:
The system applies different distribution strategies to different value types: skewed values are deduplicated locally at each processing module using hash tables, while non-skewed values maintain even distribution through traditional hash redistribution. This resolves the contradiction by preserving stability for non-skewed data while eliminating time loss for skewed data.
Solution Approach 2:
The system extracts highly skewed values from the general data stream through preliminary analysis and handles them separately through local hash table operations. This extraction removes the bottleneck-causing elements from the repetitive redistribution process, reducing time loss without affecting the even distribution of the remaining data.
3Productivity
If skewed values are handled with special processing, then system bottlenecks are reduced, but complexity increases due to hash table management and skewed value identification
Solution Approach 1:
The system uses the data's own characteristics (frequency of skewed values) to identify and handle them automatically. By leveraging the inherent skew pattern in the data, the system self-identifies which values need special handling without requiring complex external analysis, thus improving throughput while limiting complexity increase.
Solution Approach 2:
The system changes the processing parameter (from global hash redistribution to local hash table operations) specifically for skewed values based on their identified characteristics. This parameter change is driven by the data's own skew properties, allowing the system to improve throughput through targeted optimization rather than universal complexity.
Data Source
AI summary
A system, method, and computer-readable medium for optimization of query processing in a parallel processing system are provided. Skewed values and non-skewed values are treated differently to improve upon conventional DISTINCT and aggregation query processing. Skewed attribute values on which a DISTINCT selection or group by aggregation is applied are allocated entries in a hash table. In this manner, a processing module may consult the hash table to determine if a skewed attribute value has been encountered during the query processing in a manner that precludes repetitive redistribution of rows with highly skewed attribute values on which a DISTINCT selection or group by aggregation is applied.


