Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Advice on problems with "Client Processing Time" Expand / Collapse
Author
Message
Posted Friday, April 19, 2013 7:34 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 16, 2014 2:51 AM
Points: 154, Visits: 297


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...

:)
Post #1444391
Posted Friday, April 19, 2013 7:55 AM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 10:48 AM
Points: 20,857, Visits: 32,877
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.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1444414
Posted Friday, April 19, 2013 8:12 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 16, 2014 2:51 AM
Points: 154, Visits: 297
Thanks, attachments added....can't see a "huge" difference between them to be honest...

  Post Attachments 
Query1_ExecutionPlan_ProductionServerRun.sqlplan (4 views, 38.64 KB)
Query1_ExecutionPlan_DirectTestServerRun.sqlplan (3 views, 39.06 KB)
Post #1444430
Posted Friday, April 19, 2013 9:36 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 16, 2014 2:51 AM
Points: 154, Visits: 297
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...
Post #1444486
Posted Monday, April 22, 2013 1:59 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 16, 2014 2:51 AM
Points: 154, Visits: 297
No suggestions?

I'll be working on this today, so if I find a solution/cause, I'll post it up...
Post #1444890
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse