| Author |
Topic  |
|
|
shaggy
Posting Yak Master
India
228 Posts |
Posted - 02/23/2011 : 07:29:19
|
Pops,
I could not able to find actual execution for a function.is there any way to get that and when i closely analyze cpu utilization is high when using function.can anyone please advice for this behaviour. |
|
|
Transact Charlie
Flowing Fount of Yak Knowledge
United Kingdom
3426 Posts |
Posted - 02/23/2011 : 07:49:30
|
you could use profiler. Probably the best way to do it.
Or -- if you know the code that is causing the problem (or you have a high degree of suspicion) you could grab it, run the code in management studio and look at the execution plan.
Charlie =============================================================== Msg 3903, Level 16, State 1, Line 1736 The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
|
shaggy
Posting Yak Master
India
228 Posts |
Posted - 02/23/2011 : 08:07:00
|
Thanks for reply charlie,
when i execute the function with actual execution plan on i could not able to get the exact plan and i could not able to find the query plan for underlying select statement. is there any other way to find |
 |
|
|
Transact Charlie
Flowing Fount of Yak Knowledge
United Kingdom
3426 Posts |
Posted - 02/23/2011 : 10:35:16
|
yeah -- extract the logic from the function -- set it up in script form. give it parameters. Then run it.
Or just have a look at the code -- chances are there's something in there (a loop maybe) that can be rewritten.
Charlie =============================================================== Msg 3903, Level 16, State 1, Line 1736 The ROLLBACK TRANSACTION request has no corresponding BEGIN TRANSACTION |
 |
|
|
shaggy
Posting Yak Master
India
228 Posts |
Posted - 02/24/2011 : 00:11:56
|
| charlie i want to know whether plan will be generated for functions bcoz when using function cpu utilization is very high.i think plan will not be generated .i dont know the exact inner thing, can u put some light on this. |
 |
|
|
mmarovic
Aged Yak Warrior
Czech Republic
518 Posts |
|
| |
Topic  |
|