title: Subquery returns thousand of rows, cause slow
body: <p>Having troubles making a subquery like this:</p>
  
  <pre><code>SELECT ser_id FROM service 
  WHERE ser_id NOT IN 
      (SELECT ser_id FROM history WHERE his_status=2)
  </code></pre>
  
  <p>It has a delay like 4 seconds.</p>
  
  <p>If I run only the subquery:</p>
  
  <pre><code>SELECT ser_id FROM history WHERE his_status=2
  </code></pre>
  
  <p>It works in only 0.5 seconds.
  This subquery has like 50 thousand of records.</p>
  
  <p>Any way to optimize this? Thank you.</p>