Link to home
Start Free TrialLog in
Avatar of codebozo
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?
ASKER CERTIFIED SOLUTION
Avatar of Scott Pletcher
Scott Pletcher
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial