title: Need help understanding Magento product collection objects and the catalog/product model
body: <p>I've inherited a Magento project which an old developer was in charge of. Having very limited Magento experience, I'd like to understand how product collections and the <code>catalog/product</code> model is working.</p>
  
  <p>Specifically I'm wondering why the collection and product objects are so huge?</p>
  
  <p>I have code like this:</p>
  
  <pre><code>&lt;?php $_productCollection = $this-&gt;getLoadedProductCollection(); ?&gt;
  &lt;?php foreach ($_productCollection as $_product): ?&gt;
      &lt;?php $_product = Mage::getModel( 'catalog/product' )-&gt;load( $_product-&gt;getId() ); ?&gt;
      &lt;?php print $this-&gt;getLayout()-&gt;createBlock('mymodule_name/category_products_item')-&gt;setProduct($_product)-&gt;toHtml() ?&gt;
  &lt;?php endforeach ?&gt;
  </code></pre>
  
  <p>When I do <code>print_r($_productCollection)</code> or <code>print_r($_product)</code> I get <em>massive</em> amounts of data, when all I really want is a few product attributes (ID, name, price, image URL, etc.).</p>
  
  <p>I'm used to a custom relational database platform where, if I needed to use products, I'd just do something ultra-simple like <code>SELECT id,name,price FROM products;</code>! I'm not at all sure how I'd achieve this in Magento. Do I create a custom model or something?</p>
  
  <p>So can anyone please tell me:</p>
  
  <p>1) Why are the above objects so huge? </p>
  
  <p>2) If I only need a few product attributes (as above) then is there a way to limit the objects to only those attributes to reduce their size?</p>
  
  <p>3) Is there a performance or memory hit from using objects this way?</p>
  
  <p>Many thanks!</p>