There is an equal question about SO. What guarantees exist in the complexity of executing (Big-O) LINQ methods?
See this section in the difference answer:
Great, GroupBy Join, and I also believe aggregate aggregation methods (Union, Intersect, and Except) use hashing, so they should be close to O (N) instead of O (N 2).
Filip Ekberg
source share