codebozo
asked on
SQL Server view query slow until refreshed
I have a view that starts performing slowly when queried via a C# program using LINQ to SQL. The equivalent query executed in management studio performs fine. By equivalent I mean that the SQL code that is created by LINQ to SQL is pasted into management studio and executed.
After I run sp_refreshview then the LINQ to SQL C# program performs as well as running the query in management studio. There have not been any changes to the schema during this period.
Any ideas?
After I run sp_refreshview then the LINQ to SQL C# program performs as well as running the query in management studio. There have not been any changes to the schema during this period.
Any ideas?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.