Executing same request from C# VS SSMS give different execution time
Is this consistent, time after time?
I see a CPU difference which could be compile time. Are there any LINQ settings that affect this?
Edit:
- Capture the plans in Profiler
- Are you sure the SQL is the same in Profiler?
I think that the problem is in the EDMX file use to generate queries from the C# app.
I found those links that explain the case.
Code Project
Stackoverflow-1
Stackoverflow-2
You will want to look at the Execution plans for the two queries and see where they are different.