The invention discloses a
database parallel window aggregation method based on a column storage format and a streaming execution engine. The method comprises the following steps: distributing a
hash table group for a
window function; dividing to-be-aggregated query
result set data into a plurality of segments, and distributing the segments to a plurality of grouped tasks for concurrent execution; after all the grouping tasks are completed, a merging and sorting task is created; after the merging sorting task is completed, creating a plurality of aggregation tasks according to grouping fields of the merging
hash table, and performing lock-free concurrent execution; after all aggregation tasks are completed, dividing query
result set data into a plurality of segments, distributing the segments to a plurality of connection tasks, performing concurrent execution, and performing hash connection combination on the query
result set data and aggregation results obtained by the aggregation tasks by the connection tasks to obtain a final aggregation result of the
window function; when a plurality of window functions exist, the window functions with the same window definition
multiplex the same
hash table group, the window functions with different window definitions use independent hash table groups, and grouping, sorting, aggregation and connection tasks of different hash table groups are executed concurrently. According to the method, the performance of
database window aggregation operation pre-sequencing and grouping can be improved, aggregation operation is divided into sub-tasks according to grouping, and the sub-tasks are executed in parallel to improve the
degree of parallelism.