Hi Everybody I have a stored proc that uses a cursor . Each time ,the cursor forward(fetch next into),i do some caluctations by using UDfs before inserting results in a local table. And the stored proc needs 3 minutes to finish wow !! I know that calling each time the Udfs harms performance,but i dont have a choice as the calulations are dynamic. X=SUM(Results(udf)) Any help ! Thanks.