Hello,
I have a strange behavior with a complicated query in EF 5.0
(Times from SQL Proviler)
- If I use .AsNoTracking the Query runs for 12 Seconds
- If I copy the query from Profiler to SQL Query Analyser it runs 340 ms
- If I DON'T use .AsNoTracking the Query runs für 330 MS
- If I use .AsNoTracking again the Query runs for 12 Seconds
This can be repeated over and over, so it is no chaching Problem - If I restart the Server and execute the fast Scenarios first I get about the same results, only the first time it takes some ms longer...
What can this be?
Any hints would be really great, because I always use AsNoTracking where possible...
Markus
I have a strange behavior with a complicated query in EF 5.0
(Times from SQL Proviler)
- If I use .AsNoTracking the Query runs for 12 Seconds
- If I copy the query from Profiler to SQL Query Analyser it runs 340 ms
- If I DON'T use .AsNoTracking the Query runs für 330 MS
- If I use .AsNoTracking again the Query runs for 12 Seconds
This can be repeated over and over, so it is no chaching Problem - If I restart the Server and execute the fast Scenarios first I get about the same results, only the first time it takes some ms longer...
What can this be?
Any hints would be really great, because I always use AsNoTracking where possible...
Markus