title: MySQL performance with large WHERE IN() clause
body: <p>Let's say we have a table with 4 columns: <code>id (int 11, indexed), title, content, category (varchar 5)</code>.</p>
  
  <p>I have a user select a category. Each category can contain up to 999 objects. Using <code>SELECT id FROM table WHERE category = ?</code> I get a list of all objects.</p>
  
  <p>I then have the user select/deselect some of the objects. After which I need to select the content of the remaining selected objects.</p>
  
  <p>Now my question is as follows, should I worry about performance when using <code>SELECT content FROM table WHERE id IN($array)</code>? Would it be better to use <code>SELECT content FROM table WHERE category = ? AND id IN($array)</code>. The idea here being I filter it down to 999 objects before performing the IN...</p>
  
  <p>Does this make any sense? Or should I not be using the <code>IN()</code> at all?</p>