title: PHP (Phalcon Framework) and MySQL: Models Relationships vs JOIN
body: <p>For example there are 3 tables:</p>
  
  <ul>
  <li>products</li>
  <li>product_images</li>
  <li>product_specs</li>
  </ul>
  
  <p>And there are <strong>one-to-one</strong> relationships in models of this 3 tables.</p>
  
  <p>By showing 50 products on page - it get more +2 extra queries inside cycle, so in total there are 150 rows and cool object:</p>
  
  <pre><code>$products = Products::find();
  foreach ($products as $product)
  {
      $product-&gt;name;
      $product-&gt;images-&gt;filename;
      $product-&gt;specs-&gt;volume;
  }
  </code></pre>
  
  <p>Or just create custom method in Products Model and JOIN all necessary tables:</p>
  
  <pre><code>$products = Products::getComplete();
  foreach ($products as $product)
  {
      $product-&gt;name;
      $product-&gt;imageFile;
      $product-&gt;specVolume;
  }
  </code></pre>
  
  <p>So, i'm wondering: is 1st practice is useful and don't make high load on MySQL daemon or slowing drastically php script execution time?</p>