title: Best way to optimize this SQL query?
body: <p>I'm trying to fetch 5 results of jobs per page (I'm using silex with doctrine), but the page takes about 30-40 seconds to load.</p>
  
  <pre><code>  $sql = "
              SELECT jobs.ID, jobs.date_added, jobs.user, jobs.title, jobsmeta.meta_value, jobs_locations_rel.county, jobs_locations_rel.city, usersmeta.meta_value, attachments.title
              FROM jobs
                  JOIN jobsmeta
                      ON jobsmeta.parent_id = jobs.ID
                  JOIN jobs_locations_rel
                      ON jobs_locations_rel.parent_id = jobs.ID
                  JOIN usersmeta
                      ON usersmeta.parent_id = jobs.user
                  JOIN attachments
                      ON attachments.ID = (SELECT meta_value FROM usersmeta WHERE parent_id = jobs.ID AND meta_key = 'user_avatar' LIMIT 1)
                  ORDER BY jobs.date_added DESC LIMIT 5";
              $data = $app['db']-&gt;fetchAll($sql);
  </code></pre>
  
  <p>This would be the explain plan :
  <a href="https://i.stack.imgur.com/MuPLs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MuPLs.png" alt="enter image description here"></a> 
  How could I optimize this query to get the result in a shorter time?</p>