May 2, 2012 at 10:51 am
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??
May 2, 2012 at 1:13 pm
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
May 2, 2012 at 1:36 pm
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
May 2, 2012 at 1:58 pm
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?
May 2, 2012 at 1:58 pm
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