title: How to improve performance of Laravel query builder when using a custom query
body: <p>When searching for the topic <code>How to increase performance on Laravel</code>, I found a bunch of things but when it comes about <code>database</code>, allI could find was <strong>Eager Loading</strong>.  </p>
  
  <p>But how do we increase database query performance when using <code>query builder</code> and custom queries?<br>
  When I say <em>Custom Query</em> I mean a query really complex full of joins and <code>subQuery</code>.(Which I believe can't be replicated using <code>Eloquent</code>).   </p>
  
  <p>I believe there is no need to post the query since I'm not trying to find a bug, I just need some guidance about <code>How to increase performance</code> in this scenario? What could I try to do?  </p>
  
  <p>Working with legacy application, can't change much about the query.<br>
  Currently, my query is 15~17 seconds.</p>