title: SQL performance: WHERE vs WHERE(ROW_NUMBER)
body: <p>I want get n-th to m-th records in a table, what's best choice in 2 below solutions:</p>
  
  <p>Solution 1:</p>
  
  <pre><code>    SELECT * FROM Table WHERE ID &gt;= n AND ID &lt;= m
  </code></pre>
  
  <p>Solution 2:</p>
  
  <pre><code>    SELECT * FROM 
                  (SELECT *, 
                          ROW_NUMBER() OVER (ORDER BY ID) AS row 
                   FROM Table 
                  )a 
      WHERE row &gt;= n AND row &lt;= m
  </code></pre>