query_mem_timeout option [database]

Sets the maximum time, in milliseconds, that a request waits for a memory grant.

Allowed values

-1, 0, positive integer

Default

-1

Remarks

When this option is set to -1 (the default) or any value less than 0, the request waits for a memory grant for up to 50 times the estimated execution time for the request. If this option is set to 0, the request waits forever for memory to be granted. Otherwise, the value is the maximum time, in milliseconds, that a request waits for a memory grant.

See also