Monday, February 20, 2012

Limit server resources per query

Hello,
I've got a huge query that takes a fair amount of time to
run, and ideally this query will be run in the middle of
the night, so I wont have any issues with any customer
facing applications...
However in testing, I need to develop this report in the
daytime, and dont have the liberty of having a development
server. I was curious if in a sql statement, I could
specify that I'd rather have a query take longer, than
prevent other applications from being able to process data
in a timely fashion. (I get timeouts etc in the other apps)
As it sits this query takes about 4 minutes on a quite
fast sql server, and I dont mind it so much, but it seems
in that 4 minutes, other services are really hurting.
Thanks in advance,
Weston Weems
There is no option such as the one you describe but you can add MAXDOP hints
to the sql statements that will limit the number of processors used by the
query. So if you have 4 procs you can set it to 2 and leave 2 for the other
users. It may take longer but should be more respectful of the other users.
Andrew J. Kelly SQL MVP
"Weston Weems" <anonymous@.discussions.microsoft.com> wrote in message
news:0ae401c51848$8b06fc90$a501280a@.phx.gbl...
> Hello,
> I've got a huge query that takes a fair amount of time to
> run, and ideally this query will be run in the middle of
> the night, so I wont have any issues with any customer
> facing applications...
> However in testing, I need to develop this report in the
> daytime, and dont have the liberty of having a development
> server. I was curious if in a sql statement, I could
> specify that I'd rather have a query take longer, than
> prevent other applications from being able to process data
> in a timely fashion. (I get timeouts etc in the other apps)
> As it sits this query takes about 4 minutes on a quite
> fast sql server, and I dont mind it so much, but it seems
> in that 4 minutes, other services are really hurting.
> Thanks in advance,
> Weston Weems

No comments:

Post a Comment