title: Performance effect of using TOP 1 in a SELECT query
body: <p>I have a User table where there are a Username and Application columns. Username may repeat but combination of Username + Application is unique, but I don't have the unique constraint set on the table (for performance) </p>
  
  <p>Question: will there be any difference (performance-wise) between :</p>
  
  <pre><code>SELECT * FROM User where UserName='myuser' AND Application='myapp'
  </code></pre>
  
  <p>AND -</p>
  
  <pre><code>SELECT TOP 1 * FROM User where UserName='myuser' AND Application='myapp'
  </code></pre>
  
  <p>As combination of Username + Application is unique, both queries will always return no more than one record, so TOP 1 doesn't affect the result. I always thought that adding TOP 1 will really speed things up as sql server would stop looking after it found one match, but I recently read in an article that using TOP  will actually slow things down and it's recommended to avoid, though they haven't explained why.</p>
  
  <p>Any comments?</p>
  
  <p>Thank you!
  Andrey</p>