If i execute a query that take a long time how can i tell which part of the
query is causing the problem ?
Is there anyway to step a query ?
Profiler just shows execution start & stop.
If i have a complex script to deploy for example, it would helpful to know
which part its on ... or using queries with queries.
I guess the obvious answer is to break it up into different scripts.
Thanks for any info.
Scott
Denny Cherry - 17 Jul 2008 18:20 GMT
A while ago I wrote an addition to sp_who2 called sp_who3 which does
just this. When sp_who3 is run with a spid it will spid on a lot of
information including the current command within the batch which is
being run.
More info can be found here
http://itknowledgeexchange.techtarget.com/sql-server/upgrade-for-sp_who2-called-
sp_who3/
Denny
>If i execute a query that take a long time how can i tell which part of the
>query is causing the problem ?
[quoted text clipped - 10 lines]
>Thanks for any info.
>Scott
Scott - 18 Jul 2008 14:44 GMT
Uri Dimant - 20 Jul 2008 08:35 GMT
Scott
See an execution plan of the query.
> If i execute a query that take a long time how can i tell which part of
> the query is causing the problem ?
[quoted text clipped - 10 lines]
> Thanks for any info.
> Scott