The topic of the performance issue of Include() has been discussed in this forum before in
thread like this. That discussion is little old and I have not seen discussing after.
Has the problem of Include() gone away in the latest version of EF4.1? In my experience it is not. I'm dealing with few tables having less than 100K records and the query has a four level deep object graph and has a GroupBy projection. The GroupBy
requires the deep object graph from the tables to calculate a sum operation that needed. The performance is very slow. If I do this in the stored procedure, it is very faster.
1. To solve the problem, I can have a stored procedure which can do the groupby. I can get the data by executing the stored proc via EF and move the data to a DTO. Is that the right approach?
2. My second issue is about paging. With stored procedure I have better control of bringing in a paged data (25 records of 100K records). Is this kind of paging mechanism available in EF via Linq queries?