title: The linq query in Entity Framework is too slow
body: <p>I am using EF6 (model-first) that connects to Oracle 11G.</p>
  
  <p>I have 3 tables A,B,C, and I defined the right FK to get the relationships:</p>
  
  <pre><code>1. B is a child of A.
  2. C is a child of B.
  </code></pre>
  
  <p>Now, I'm running the following code (using eager loading) to get A with B and C:</p>
  
  <pre><code>var myQuery = from r in MyContext.A
                                   .Include(x =&gt; x.B.Select(y =&gt; y.C))
                                   .Where(a =&gt; a.sku == 2);
  var res = myQuery.FirstOrDefault();
  </code></pre>
  
  <p>As you can see I use include and select to eagerly retrieve A with its B's and the B with its C's.</p>
  
  <p>My problem is that it takes around 4 seconds to run the <code>FirstOrDefault()</code> method.</p>
  
  <p>I have tested it on TOAD, and the generated SQL executed in less than one second.</p>
  
  <p>The retrieved object (i.e. populated A), is not so big (A has 5 B's and each B has 2 C's, and each table has ~10 columns).</p>
  
  <p>Is there a way to improve the performance?</p>