I created a a SQL C# CLR table valued function which gets called inside a stored procedure. This was taking 9 seconds to run on a record set of 250000 records.
Without changing the record set or the code, the stored procedure now runs in 1 minute 19 seconds. I have checked and the time is taken up by the same CLR TVF.
I even restarted the SQL Server instance to remedy the problem but the function still takes more than 1 minute.
Any idea why this would happen?
Thanks for your help in advance.
www.SQL4n00bs.com