Duration is incorrect on Profiler for SQL2005

  • I'm aware that profiler can show duration in microseconds. I'm running a

    trace for a specific DB where the duration is incorrect. If I manually

    subtract starttime from endtime, I'm seeing what I'm sure are accurate times

    (generally about 1/2 second). For these statements that take 1/2 second

    realtime, duration is displayed in the neighborhood of 54,###,###, (and

    sometimes it shows massive negative numbers). That would be 54 seconds in

    microseconds, or 54,000 seconds in milliseconds - I'm 100% sure neither is

    correct.

    Under Tools, Options "show in microseconds" is unchecked. If I check it, it

    just adds 3 digits, as expected, but still is incorrect.

    Has anyone else seen this behavior and is there a workaround that doesn't

    involve writing to a SQL table and running SQL to get duration?

    Thanks.

    --

    Kevin

  • If I'm not mistaken, duration in Profiler is total duration, not per-run duration. (I could be thinking of something else though. My brain is taking a long time to boot up this morning.)

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • When Profiler displays a line for an executed SQL statement (eg SELECT atable where ...), I'm pretty sure the duration column shows duration of the listed SQL statement (or EXEC, UPDATE, etc). SQL2000 Profiler has always been perfect in displaying duration (in milliseconds), SQL2005 does not appear to work at all...

    My workaround has been to subtract endtime from starttime to get a feel for duration, but I'm trying to understand / correct the duration bug. Remember, it even lists massive negative numbers for duration from time-to-time.

    Duration appears to be incorrect on SQL2005.

    Any ideas?

  • Duration has only meaning in "Completed" events not in "starting" events.

    Are you seeing those in "RPC /Batch Completed" ?


    * Noel

  • In all cases (Events) where you have both a starting time and an ending time, it shouldbe true that Duration = EndTime - StartTime.

    If not, then something is wrong with your profiler. Maybe a bug in the Profiler or corrupt DLL or bad FPA.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

Viewing 5 posts - 1 through 5 (of 5 total)

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