Setting the buffer manager memory

Hashing can use a significant amount of tempdb buffer cache memory. By default, update statistics uses the value to which the max resource granularity configuration parameter is set, which is the percent of the tempdb buffer cache that can be used.

See “Setting Configuration Parameters” in the System Administration Guide, Volume 1.

Limit the amount of buffer memory used with update statistics ... max_resource_granularity. If Adaptive Server reaches this value, it selects a column from which it recycles the memory so it can finish hashing the remaining columns. The histograms for columns from which it recycles resources are gathered on subsequent scans using hashing. To avoid the extra scans, increase the value for max resource granularity, if necessary.