title: How bad is IN operator for SQL query perfomance?
body: <p>I had SQL query that was taking 9 hours for execution. See below:</p>
  
  <pre><code>Select Field1, Field2
  From A
  Where Field3 IN (45 unique values here) 
  </code></pre>
  
  <p>When I have split this query into 3 exactly the same queries only with each having 15 values within IN clause, they each took 2 minutes to execute.
  So instead of spending 9 hours I now spend 6 minutes (3 queries * 2 minutes). </p>
  
  <p>Can anyone explain please how practically the same queries with only difference in quantity of values in the <code>IN</code> clause take that different an amount of time to run? </p>