Combined Sort and Aggregation Using Chunked Memory Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional systems require excessive memory and result in inefficient sorting and aggregation operations due to the need for full data record loading, leading to resource-intensive and time-consuming processes, especially when dealing with large datasets.
Innovation Solution
The technique involves splitting data records into smaller chunks, performing aggregation while sorting, and merging aggregate results from these chunks to achieve efficient sorting and aggregation using less memory than required for the entire dataset, thereby reducing the need for disk spilling and optimizing resource utilization.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Manufacturing precision
If all data records are loaded into memory to perform full sort, then sorting accuracy is improved, but memory usage increases significantly
Solution Approach 1:
The patent divides the large dataset into multiple smaller chunks or batches that can be processed separately in memory. Each chunk is sorted and aggregated independently, then the results are merged to produce the final sorted and aggregated output. This segmentation allows the system to maintain sorting accuracy while using only a fraction of the memory that would be required to load all data records simultaneously.
2Quantity of substance
If batches of sorted data records are spilled to disk, then memory usage is reduced, but processing speed decreases significantly
Solution Approach 1:
The patent combines the sort operation and aggregation operation into a single integrated process. By performing aggregation during the sort phase rather than after complete sorting, the system avoids the need to spill intermediate sorted results to disk. The merge operation combines sorted chunks while simultaneously performing aggregation, maintaining processing speed while reducing memory usage.
3Productivity
If maximum memory is allocated to sort operation, then sorting performance is improved, but other processes are starved of memory resources
Solution Approach 1:
The patent processes data in partial batches rather than requiring the entire dataset to be loaded at once. Each batch is processed with a reasonable amount of memory allocation, achieving sufficient sorting performance for that subset while leaving memory resources available for other system processes. This partial action approach eliminates the need to allocate maximum memory to the sort operation.
4Quantity of substance
If data is processed in smaller chunks with aggregation during sorting, then memory usage is reduced, but operation complexity increases
Solution Approach 1:
The patent performs preliminary sorting and aggregation on each data chunk before the merging phase. This preliminary action prepares the data in an optimized state where aggregation results can be easily merged with other chunks. By doing the preparatory work in advance on smaller manageable pieces, the overall operation becomes more systematic and less complex than attempting to handle all data simultaneously.
Data Source
AI summary
Innovative techniques are disclosed for performing a combined sort and aggregation operation involving eagerly performing aggregation while sorting. The techniques described herein enable an aggregation and a group-by operation to be performed using an amount of system memory that is far less than the system memory required to store all the data records being processed while minimizing the need to spill data to disk. This combined sort and aggregation operation has better performance than conventional techniques since system memory is used more efficiently. In certain embodiments, a combined sort and aggregation operation is disclosed that enables the efficient sorting and aggregation of data records when the desired aggregation function is composable (such as SUM, COUNT, MIN and MAX aggregate operations).


