Quantcast
Channel: Entity Framework
Viewing all articles
Browse latest Browse all 10318

Created Unassigned: Using .AsNoTracking results in long Query time [1394]

$
0
0
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


Viewing all articles
Browse latest Browse all 10318

Trending Articles