title: SQL performance MAX()
body: <p>Just got a small question. When trying to get a single max-Value of a table. Which one is better?</p>
  
  <pre><code>SELECT MAX(id) FROM myTable WHERE (whatever)
  </code></pre>
  
  <p>or</p>
  
  <pre><code>SELECT TOP 1 id FROM myTable WHERE (whatever) ORDER BY id DESC
  </code></pre>
  
  <p>I'm using Microsoft SQL Server 2012</p>