Does SQL Resource Governor re-allocate resources during execution of a query?

263 views Asked by At

Say, I have two users (U1, U2) mapped to two resource pools (R1, R2) and with max values as 20% and 80%. U1 executes a time consuming query that runs for say 15 minutes. When it started execution it was the only process and hence SQL server allocates full resources to this query. 5 minutes later U2 executes another query. Will Resource Governor reduce the resources of U1 to 20% and allow U2 to take 80% or will it wait for U1 to complete and then allow U2 80%.

I agree that the first case is what is expected but I saw this post and got curious. Please explain what will happen in the real scenario.

1

There are 1 answers

3
Rob Farley On BEST ANSWER

Resource Governor only kicks in when there's contention for resources. If a particular connection is meeting no argument in its desire to use all the resources on the box, it will.

So if there's a process that's running for an hour or so, but for ten minutes, a process comes along that wants 80% (and is allowed to use 80%), then the original process will be shrunk back to 20% for that ten minutes.

Hope this clears it up for you.