Would you mind posting the TVF definition?
I just want to be sure that it is not a multistatement TVF.
Is it defined as
CREATE FUNCTION DBO.iTVF (@Var INT)
RETURNS TABLE
AS
RETURN
SELECT blaadieblah
FROM dbo.mytable
WHERE MYColumn = @var
GO
Or is it defined as
CREATE FUNCTION DBO.MultiTVF (@Var INT)
RETURNS @Multi TABLE (Var INT)
AS
BEGIN
INSERT INTO @Multi (Var )
SELECT blaadieblah
FROM dbo.mytable
WHERE MYColumn = @var
RETURN;
END
GO
Let us have the TVF as well as the query which includes the TVF as the TVF by itself may not give a clue as to what is occuring.
An execution plan would be great.