slow sql 2005 UDF query
we are using CF 8 and SQL 2005.
We have a SQL UDF that returns table results which takes 6 or 7 seconds when called through CF. When we take the query that CF ran and run it from SQL Management Studio the UDF returns the results in < 1 second.
The really weird thing is when we recompile the UDF CF can get results in < 1 second. But after a few minutes it reverts back to the 6 or 7 seconds.
Anybody have any thoughts on what we can do about this? Thanks in advance.
