April 19, 2013 at 7:34 am
Hello all,
I've encountered a strange problem on one of my test SQL Servers.
It is a VM box on a SAN, with Windows Server 2008, SQL Server 2008 R2, 16GB RAM and 4 CPU cores allocated.
The hardware allocation is more than sufficient for the database that is running on it, and is similar to the current production server.
When I run a test query (which is essentially returning the entire results of a view), it takes 9-10 seconds to return the results.
However, when I run the same query on the production server, it takes 1-2 seconds.
I've monitored the hardware while the query was running and also enabled execution plan and client statistics.
I/O is less than the production box and the memory utilisation anc CPU utilisation is next to nothing.
The only difference I can see between the queries run on each, is that the CLIENT PROCESSING TIME is 3 times as long on the test box.
Interestingly, to make matters even more murky, I can run the query from my own PC (within Management Studio) and the query returns the results in 4-5 seconds (less than half the time it takes to run directly on the server, but still twice the time in production).
Can anyone recommend some good places to start looking, to uncover what the underlying problem could be?
Many thanks in advance for any suggestions...
🙂
April 19, 2013 at 7:55 am
First thing you may want to do is compare the actual execution plans for the query from each run. See if there are any differences there. You may want to post those here as well, just save them as .sqlplan files and attach them to a post.
April 19, 2013 at 8:12 am
Thanks, attachments added....can't see a "huge" difference between them to be honest...
April 19, 2013 at 9:36 am
I just cleared the wait stats on the test box and re-ran the query to see if it helped track down the cause.
When I run the query directly on the server (Taking around 8-9 secs currently)
I get the wait types:
ASYNC_NETWRK_IO (50%)
PREEMPTIVE_OS_WAITFORSINGLEOBJECT (50%)
However, when I re-clear the wait counters, and run the same query from my desktop, I DON'T get the PREEMPTIVE_OS_WAITFORSINGLEOBJECT wait type, and the counters produce:
ASYNC_NETWORK_IO (99.9%)
Not sure why this is, when querying the same server, and I haven't taken wait times from the prod box to compare against yet...
April 22, 2013 at 1:59 am
No suggestions? 🙁
I'll be working on this today, so if I find a solution/cause, I'll post it up...
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply