Answers.Body: <p>Not in Craft 2 without completely bypassing ElementCriteriaModel and building your own SQL query.</p>
  
  <p>In Craft 3 (<a href="https://craftcms.com/3" rel="noreferrer">currently in beta</a>) you can, though – you can override which columns get selected in your element queries, and you can choose whether you want the data returned as element models or just plain arrays.</p>
  
  <pre class="lang-php prettyprint-override"><code>{% set entries = craft.entries
      .section('news')
      .select('elements.id', 'content.title')
      .asArray()
      .all() %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-26T19:10:00.300Z
Answers.Text: Thanks Brandon. Awesome to know that's been addressed. I'm definitely looking forward to Craft 3.
Answers.UserDisplayName: JamesNZ
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-23T12:58:13.877Z
Answers.LastActivityDate: 2017-03-23T12:58:13.877Z
Answers.UserDisplayName: Brandon Kelly
Body: <p>The performance of the ElementCriteriaModel for lookups is killing me.</p>
  
  <p>I have 300 or so "People" entries in a craft site and trying to load them just for a basic listing page takes forever. There's just so much overhead.</p>
  
  <p>In this case of i.e. a listing page, I need the <strong>entry title</strong>, <strong>slug</strong> and an <strong>image</strong> field (which I'm eager loading). I don't need all of the other fields and overhead it loads.</p>
  
  <p>Is there a way to get more acceptable performance for cases like this specific one (listing page with large number of entries and limited data needed)? Or am I going to have to bypass the element criterea stuff and do the lookups myself in SQL?</p>
  
  <p>Thanks</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-23T08:02:52.290Z
Comments.Text: If pagination isn't an option, you'll need to bypass the `ElementCriteriaModel`. I ran into this recently, with Categories. Each `ElementModel` occupies an awful lot of memory, and there's no way to create a "partial" model from an `ElementCriteriaModel` query.
Comments.UserDisplayName: Stephen Lewis
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-26T19:05:56.847Z
Comments.Text: Unfortunately pagination isn't really an option here. Thanks Stephen.
Comments.UserDisplayName: JamesNZ
Tags: <elementcriteriamodel>
Title: Performance when loading lots of Elements but only need limited data
ThreadText: # Performance when loading lots of Elements but only need limited data
  
  (Asked by: username_0 on 2017-03-23)
  
  The performance of the ElementCriteriaModel for lookups is killing me.
  
  I have 300 or so "People" entries in a craft site and trying to load them just for a basic listing page takes forever. There's just so much overhead.
  
  In this case of i.e. a listing page, I need the **entry title**, **slug** and an **image** field (which I'm eager loading). I don't need all of the other fields and overhead it loads.
  
  Is there a way to get more acceptable performance for cases like this specific one (listing page with large number of entries and limited data needed)? Or am I going to have to bypass the element criterea stuff and do the lookups myself in SQL?
  
  Thanks
  
  **Tags:** elementcriteriamodel
  
  > **Comments:**
  > **username_1**: If pagination isn't an option, you'll need to bypass the `ElementCriteriaModel`. I ran into this recently, with Categories. Each `ElementModel` occupies an awful lot of memory, and there's no way to create a "partial" model from an `ElementCriteriaModel` query.  
  > **username_0**: Unfortunately pagination isn't really an option here. Thanks username_1.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2017-03-23. Score: 5 | Accepted answer
  
  Not in Craft 2 without completely bypassing ElementCriteriaModel and building your own SQL query.
  
  In Craft 3 ([currently in beta](https://craftcms.com/3)) you can, though – you can override which columns get selected in your element queries, and you can choose whether you want the data returned as element models or just plain arrays.
  
  ```php
  {% set entries = craft.entries
      .section('news')
      .select('elements.id', 'content.title')
      .asArray()
      .all() %}
  
  ```
  
  > **Comments:**
  > **username_0**: Thanks username_2. Awesome to know that's been addressed. I'm definitely looking forward to Craft 3.  
  
  ---
  
  