title: count VS select in LINQ - which is faster?
body: <p>I'm using <code>IQueryable&lt;T&gt;</code> interfaces throughout my application and defer execution of SQL on the DB until methods like <code>.ToList()</code></p>
  
  <p>I will need to find the Count of certain lists sometimes -without- needing to use the data in the list being counted. I know from my SQL experience that a SQL COUNT() is far less work for the DB than the equivalent SELECT statement that returns all the rows. </p>
  
  <p>So my question is: will it be less work on the DB to return the count from the <code>IQueryable&lt;T&gt;</code>'s <code>Count()</code> method than rendering the <code>IQueryable&lt;T&gt;</code> to a list and invoking the list's <code>Count()</code> method?</p>
  
  <p>I suspect it will given that the <code>ToList()</code> will fire the SELECT sql and then in a separate query count the rows. I'm hoping the <code>Count()</code> on the <code>IQueryable&lt;T&gt;</code> simply renders out the sql for a sql COUNT() query instead. But im not certain. Do you know?</p>