title: MySQL efficient test if count w/ where is greater than a value
body: <p>Is there a way to optimize the following query?</p>
  
  <pre><code>SELECT count(*)&gt;1000 FROM table_with_lot_of_rows WHERE condition_on_index;
  </code></pre>
  
  <p>Using this query, MySQL first performs the <code>count(*)</code> and then the comparison. This is is fast when only few rows satisfy the condition, but can take forever if a lot of rows satisfy it. Is there a way to stop counting as soon as 1000 items are found, instead of going through all the results?</p>
  
  <p>In particular, I'm interested in MyISAM table with full-text condition, but any answer for InnoDB and/or basic WHERE clause will help.</p>