January 21, 2010 at 8:39 am
Hi
I have a function call within an SP which is taking up 85% of the entire query.
I tried a Select * from Function_Name(parameter1, parameter2...)
and it would not give me a break up of the function in the execution plan.
There are only Table variables within which hold the select statement results in the function.
EG:
Create function Function_Name(par1, par2) RETURNS @table1 TABLE
as
Begin
Declare @table1 Table (Id int, name varchar(20))
Insert into @table1
Select id, name
from Names
end
Is it because tof the use of Table variables, that the select statements are not visible in the execution plan.
Is there any way I can view it?
January 21, 2010 at 8:53 am
Profiler. Use the showplan_xml event
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 22, 2010 at 2:24 pm
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply