Forum Discussion

ezpz97's avatar
ezpz97
Copper Contributor
Mar 26, 2025

SQL Server Stream aggregate vs Hash match aggregate

Hello. I am a new SQL Server engineer.

 

While looking at the execution plan of a query that SUM()s values ​​of int type based on the range of the date column of datetime type, I found that SUM() processing is handled by Stream Aggregate and Hash match aggregate on a case-by-case basis.

 

The table is composed of a Clustered Index with Date as the key. I think it changes to Hash match processing as the index search range increases, but I don't know the difference between the two processing methods and what criteria determine the processing method. Can you give me a good answer?

Resources