If a statement return rows doing a simple select over the data base, is there performance difference between implement it using Function and Procedures? I know it is prefera
I think you should be less concerned about speed than about how you want to use this function. A UDF can appear elsewhere in a select statement and/or even be used as the "table" to join etc. You can't "select" from a stored procedure or join on one either.
However, UDFs are called for EVERY ROW so I'd be careful where you use it. This got me in real perf trouble once. So much that I'll never forget.