title: Entity Framework, performance tuning
body: <p>I have entity "Ideas", which has child entity collection "ChildIdeas". I need to load list of ideas and count of "ChildIdeas" (only count!).
  I can do:</p>
  
  <p><strong>eager loading</strong></p>
  
  <pre><code>from i in _dataContext.Ideas.Include("ChildIdeas") ...
  </code></pre>
  
  <p>advantages : all necessary data got by one request;
  disadvantages : load unnecessary data. I need only count of ChildIdeas, not full ChildIdeas list</p>
  
  <p><strong>Explicit loading</strong></p>
  
  <pre><code>from i in _dataContext.Ideas ...
  
  idea.ChildIdeas.Loading()
  </code></pre>
  
  <p>advantages : none;
  disadvantages : many requests (ideas.count + 1) instead of one, load unnecessary data</p>
  
  <p><strong>Independent requests</strong></p>
  
  <pre><code>from i in _dataContext.Ideas ...
  
  _repository.GetCountChildIdeas(idea.ID);
  </code></pre>
  
  <p>advantages : load only necessary data;
  disadvantages : many requests (ideas.count + 1) instead of one</p>
  
  <p>all 3 types have disadvantages. Maybe is exist any way to load only necessary data? If yes - what is it, if no - which way is the best for this case?</p>
  
  <p>[ADDED]
  after load testing (for 1 user) I got Page Load (in sec):
  eager Child Ideas - 1.31 sec
  explicit Child Ideas - 1.19 sec
  external requests - 1.14 sec</p>
  
  <p>so, eager way for my case is the worst... Why even explicit way is better?</p>