Was this helpful?
[NO]HASHAGG
SET HASHAGG allows the query optimizer to consider using hash aggregation.
SET NOHASHAGG stops the query optimizer from considering the use of hash aggregation.
Aggregation is the process by which rows are collected together so that one or more aggregate operations can be performed. Hash aggregation uses hashing on the GROUP BY columns of each row to be aggregated to determine a slot into which the row will be placed. As rows arrive in the slot, they are ordered in a list by a fast binary comparison on the GROUP BY columns of the row. If no match is found, the incoming row is stored as a new entry in the ordered list. If a match with an existing entry in the list is found, the aggregate operations are carried out and the result stored in the entry in the list. The advantage of this technique is that it requires no index structures or sorting on the GROUP BY columns, and the hash and comparison operations are efficient and fast.
SET HASHAGG is the default.
Last modified date: 08/14/2024