SQL Server and Table-Valued User-Defined Function optimizations
Posted
by John Leidegren
on Stack Overflow
See other posts from Stack Overflow
or by John Leidegren
Published on 2010-04-29T07:44:10Z
Indexed on
2010/04/29
7:47 UTC
Read the original article
Hit count: 325
sql-server-2005
|tsql
If I have an UDF that returns a table, with thousands of rows, but I just want a particular row from that rowset, will SQL Server be able to handle this effciently?
SELECT * FROM dbo.MyTableUDF()
WHERE ID = 1
To what extent is the query optimizer capable of reasoning about this type of query?
How are Table-Valued UDFs different from traidtional views if they take no parameters?
Any gotchas I should know about?
© Stack Overflow or respective owner