I have a stored procedure in my MS SQL SERVER 2012 database that is called using LINQ (.NET 4.5) to populate a scheduler control.
The query completes in about 4 seconds normally both for the application calling it via LINQ and running the same query using management studio.
PROBLEM: Every few weeks the application starts timing out on that query when called using LINQ. Query runs fine via management studio.
I can fix the issue by essentially altering the SQL of the stored procedure and then altering it back to the original SQL. Then the query runs fine using LINQ again.
Any ideas what would cause this where a query gets executed differently from LINQ than it does using management studio?