Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SQL Server Administration (2008)
 Unidentifiable Difference in Duration of Query

Author  Topic 

vijayan.vinu3
Starting Member

19 Posts

Posted - 2012-02-17 : 05:47:34
Hi,

I was monitoring a the working of SQL Server on my system using SQL Server Profiler. When I was going through the trace file I noticed something. A query at some points in time had a duration of completion of 0ms. But, the same Query sometimes had a duration of 967ms. Following are images for both the scenarios :

976 ms Case:



0 ms Case:

http://www.freeimagehosting.net/wy374


Please, can anyone tell me when and why does the sql server profiler show a duration of 0 for a query. Also why is there such a big difference in durations of both the queries?

Thanx,
Vinu

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2012-02-17 : 07:27:39
It can depend on if the data needed to fulfill the request was in buffer cache or not.



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2012-02-17 : 07:29:19
Also, why are you querying the database for one attribute at any time?
Why not request all attributes in one call?



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page
   

- Advertisement -