Rows Returned
WITH UDF in Select List
UDF in Where Clause
With Expression
0.5 Million
26 seconds
4 seconds
1.0 Million
52 seconds
8 seconds
1.5 Million
86 seconds
87 seconds
12 seconds
bySourabh AgarwalTechnical Lead, Microsoft SQL Server
Is there a performance difference bewteen calling a t-sql UDF & a sql-clr UDF for a simple non data access UDF?
Yes, there would a slight difference in the performance of t-sql UDF & a sql-clr UDF. The reason being the multiple switches which need to be made between SQL engine and the CLR runtime. With t-sql UDF everything is within the SQL Engine and no addtional switches are required.
Could you fix a link to the profiler image?
Question is answered here:
stackoverflow.com/.../database-function-vs-case-statement