Problem with duration in profiler n query editor

  • Hi,

    I ran a Trace using profiler n saved as a file,and later to analyze I saved trace file as a table.

    I queried that table to get max duration. My question is the duration in profiler is showing up as 10813 where as in query editor results it showing as 10813330.

    could you plz help out from this problem.

    thanx

  • There is nothing wrong happening with your sql instance; in sql 2005, the query duration is reported in microseconds (it was milliseconds in sql 2000) However, the profiler is still doing a translation somewhere on the way between server-side traces (traces saved to table for example) and GUI (query execution of profiler GUI). To be more clear, duration values have to be read differently for server-side traces than GUI.

  • 10813 is in milliseconds... 10813330 is in microseconds... divide micoseconds by 1000 to get milliseconds.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

  • hi,

    query editor in 2005 will show duration in milli sec or micro sec?

    I read in bol that in saved trace table or trace file the duration will be displayed in micro sec.

    correct me if Iam wrong?

  • The profiler Gui will show duration in either milliseconds or microseconds, depending how the option is set (tools -> Options) However it will store the duration as microseconds and, if saved into a table, will store the duration as microseconds, regardless of the option setting.

    Gary: query editor in 2005? Are you refering to the output of Statistics Time? Or something else?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Iam talking about out put statistics time

  • Statistics time outputs in milliseconds. Microseconds would be 'us'. (iirc)

    SQL Server Execution Times:

    CPU time = 32 ms, elapsed time = 180 ms.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • hi,

    Iam analyzing a trace table in query editor.

    Trace table has columns like,text data, applicationname,cpu,reads,writes and duration.

    In duration cloumn the time will be displayed in milli sec or micro sec? plz helpout from this confusion.

    thanx

  • Hi,

    Here is a trace table opened with profilr. Iam getting different duration as compared with starttime endtime. how is it possible?

    sp:batchcompleted duration starttime endtime

    108682 11:11:33.180 11:13:21.880

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply