very very strange problem - profiler trace

  • i have a simple sproc which has two batches of select statements and is executed based on if/else condition. Now when i run the sproc i do see it is taking 30 secs to execute, in parallel i have trace enabled with four event classes sp:starting/completed and sp:stmntstarting/completed. When i look at the data it does show me that the first batch of select started but never completed, howerver the sproc completed it's execution?Does this make sense??

  • I guess it may depend on what sort of process(es) are kicked off in the batch...if they are able to be executed asynchronously, as with a stored proc execution, then the outer proc would finish, regardless.

    _________________________________
    seth delconte
    http://sqlkeys.com

  • I'd expect a statement complete event at the end of it, unless you've filtered the trace somehow.

    - 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

  • seth delconte (5/2/2012)


    I guess it may depend on what sort of process(es) are kicked off in the batch...if they are able to be executed asynchronously, as with a stored proc execution, then the outer proc would finish, regardless.

    "if they are able to be executed asynchronously, as with a stored proc execution" is this even possible? my assumption was a striaght forward select should complete before the sproc completes?

  • sqldba_newbie (5/2/2012)


    seth delconte (5/2/2012)


    I guess it may depend on what sort of process(es) are kicked off in the batch...if they are able to be executed asynchronously, as with a stored proc execution, then the outer proc would finish, regardless.

    "if they are able to be executed asynchronously, as with a stored proc execution" is this even possible? my assumption was a striaght forward select should complete before the sproc completes?

    And your assumption is correct. Which means either an error or a flaw in the trace, most likely.

    - 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

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

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