title: Laravel relationship is slow
body: <p>I try to run this code</p>
  
  <pre><code>Item::with('product_save')-&gt;whereHas('product_save', function($q){ 
      $q-&gt;where('user_id', 4);
  });
  </code></pre>
  
  <p>with</p>
  
  <pre><code>paginate(20);
  </code></pre>
  
  <p>Item Model :</p>
  
  <pre><code>    class Item extends Model
  {
      protected $table = 'products';
  
      public function product_save()
      {
          return $this-&gt;hasOne('App\Product_save','product_id')-&gt;where('user_id', Auth::user()-&gt;id);
      }
  }
  </code></pre>
  
  <p>but is so slow my database has more than 1M records.</p>
  
  <p>paroduct_saves table :
  <a href="https://i.stack.imgur.com/2OjGA.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2OjGA.png" alt="enter image description here"></a></p>
  
  <p>thanks</p>