Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Symptoms

Your query may run slowly if the following conditions are true:

  • The query uses aggregates such as group by.

  • SQL Server uses hash aggregate in the query plan.

  • The estimated number of distinct values is much lower than the actual number of distinct values for the aggregate.

When this issue occurs, you will see a hash warning Event if you do Profiler or Extended Event tracing.

Cause

This issue occurs because SQL Server underestimates the amount of memory grant needed. This results in intermiedate results spilling to tempdb.

Resolution

The issue was first fixed in the following cumulative update of SQL Server:

Note You have to enable trace flag 9410 to activate this fix.

Each new cumulative update for SQL Server contains all the hotfixes and all the security fixes that were included with the previous cumulative update. We recommend that you download and install the latest cumulative updates for SQL Server:


References

Learn about the terminology that Microsoft uses to describe software updates.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×