title: Does the number of columns returned affect the speed of a query?
body: <p>If I have two queries</p>
  
  <pre><code>SELECT Id, Forename, Surname
  FROM Person
  WHERE PersonName Like(‘%frank%’)
  </code></pre>
  
  <p>And</p>
  
  <pre><code>SELECT *
  FROM Person
  WHERE PersonName Like(‘%frank%’)
  </code></pre>
  
  <p>Which query will run faster? Is the where clause / table joining the biggest factor, or the number of columns returned?</p>
  
  <p>I’m asking because I’m building a series of objects that map to database tables. Typically each object will have at least these three methods:</p>
  
  <p><code>Select</code> – Selects everything</p>
  
  <p><code>List</code> – Selects enough that is can be used to populate a dropdown list</p>
  
  <p><code>Search</code> – Selects everything that is viewable in the results, typically about 6 or so columns.</p>
  
  <p>If each query returned exactly the same set of columns the maintenance and testing of the code should be more trivial. The database is unlikely to get above 50,000 rows in any given table, so if the difference in performance is small then I’ll take the saving in development time. If the performance is going to drop through the floor, then I’ll work at in from a different angle.</p>
  
  <p>So, for ease of development, is <code>SELECT *</code> sensible, or is it naive?</p>