We have a performance problem which narrows down to our app-server. One possible suspect is that in some cases, the time to compile the Linq2Entity query becomes unreasonably long.
We’re extending our logging system to include the executed sql.
I plan to use the .ToString() method of IQueriable to obtain the sql.
- Will this force EF to compile the query?
- Will EF use this plan when we enumerate the
IQueriableand avoid recompiling the query? - Is there any downside to this?
1 Answer