Inline UDF Vs Table Valued UDF
Posted on 2004-11-29
Does an inline UDF return a virtual table (loaded into memory) in the same way as a table valued UDF? Or is it more like a view that accepts parameters?
One advantage to using table valued over inline is that In my table definition I can specify a primary key and therefore make use of a clustered index. I can't do that with an inline function.
In a scenario where I have a table of 10000 records and my udf is going to return an avg of 5 of those each time it's called would an inline function be more efficient than a table valued function?