Dynamic Database Table Joining via Skew Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for parallel database systems face challenges in accurately detecting skewed values and their frequencies, which limits the effectiveness of partial redistribution and partial duplication (PRPD) join strategies, leading to suboptimal query performance due to uneven data distribution across nodes.
Innovation Solution
The proposed solution involves dynamic joining of database tables using incremental planning and execution (IPE) and dynamic statistics, where temporary skew values are derived from intermediate spool tables, and the Top-K buffer approach is enhanced with a reservoir buffer to estimate skewed hashes and their frequencies, allowing for more accurate skew detection and minimization of processing overhead.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If traditional skew detection methods are used in parallel database systems, then the system can perform join operations, but the detection accuracy of skewed values and their frequencies is insufficient, leading to suboptimal query performance
Solution Approach 1:
The system performs preliminary skew detection by maintaining Top-K buffers that pre-calculate and store skewed hash values and their frequencies before join operations execute. This advance preparation enables more accurate skew detection and allows the system to optimize join strategies beforehand, resolving the contradiction between detection accuracy and query performance.
Solution Approach 2:
The system implements feedback mechanisms where skew detection results from previous operations inform subsequent join strategies. The Top-K buffers continuously update skew statistics, and this feedback is used to dynamically adjust redistribution and duplication strategies, improving both detection accuracy and overall query performance over time.
2Productivity
If partial redistribution and partial duplication (PRPD) join strategies are used, then join operations can be performed, but the management cost of Top-K buffers increases and processing overhead is reduced only partially
Solution Approach 1:
The system segments the skew detection and management process by maintaining separate Top-K buffers for different tables and join operations. This segmentation allows independent optimization of each buffer, reducing the overall management complexity while maintaining high join operation efficiency through targeted skew handling.
Solution Approach 2:
The system dynamically changes parameters such as the buffer size K and redistribution thresholds based on detected skew patterns. By adjusting these parameters adaptively, the system optimizes the balance between Top-K buffer management costs and join operation efficiency, implementing PRPD strategies only when beneficial.
Data Source
AI summary
Disclosed are systems and methods for dynamic joining of database tables. The systems and methods can include: selecting a first table from a plurality of tables; selecting a second table from the plurality of tables; joining the first table and the second table to create a temporary table; and storing, in a memory of a computing device, the temporary table and the temporary skew value. The first table can have a first skew value. The second table can have a second skew value. The second skew value can be similar to the first skew value. The temporary table can have a temporary skew value.


