title: How can I make this query run faster?
body: <p>I'm just wondering if theres anything I could do to make the query run a bit faster?</p>
  
  <p>I have this query:
  </p>
  
  <pre><code>SELECT * FROM posts
  WHERE posts.exists = 'n'
  ORDER BY posts.ratecount DESC
  LIMIT 0,100
  </code></pre>
  
  <p><em>Takes: 2.47s @ 0,100 | 6.18s @ 500,100</em></p>
  
  <p>This works but it tends to get rather slow as the limit increases (100,100 > 200,100 etc).</p>
  
  <p>Using an index doesn't seem to help either:
  </p>
  
  <pre><code>SELECT * FROM posts
  USE INDEX(ratecount_ca)
  WHERE posts.exists = 'n'
  ORDER BY posts.ratecount DESC
  LIMIT 0,100
  </code></pre>
  
  <p><em>Takes: 8.59s @ 0,100 | 28.98s @ 500,100</em></p>
  
  <p>Strangely enough, without the WHERE it works perfect.</p>
  
  <p>A descending index would most likely fix the issue but since that doesn't seem to be implemented yet, I need another option.
  Doing the WHERE after it's ordered would mostly likely speed it up too, but since I'm rather new to SQL I have no idea how to do :&lt;</p>