title: Which is faster - NOT IN or NOT EXISTS?
body: <p>I have an insert-select statement that needs to only insert rows where a particular identifier of the row does not exist in either of two other tables. Which of the following would be faster?</p>
  
  <pre><code>INSERT INTO Table1 (...)
  SELECT (...) FROM Table2 t2
  WHERE ...
     AND NOT EXISTS (SELECT 'Y' from Table3 t3 where t2.SomeFK = t3.RefToSameFK)
     AND NOT EXISTS (SELECT 'Y' from Table4 t4 where t2.SomeFK = t4.RefToSameFK AND ...)
  </code></pre>
  
  <p>... or...</p>
  
  <pre><code>INSERT INTO Table1 (...)
  SELECT (...) FROM Table2 t2
  WHERE ...
     AND t2.SomeFK NOT IN (SELECT RefToSameFK from Table3)
     AND t2.SomeFK NOT IN (SELECT RefToSameFK from Table4 WHERE ...)
  </code></pre>
  
  <p>... or do they perform about the same? Additionally, is there any other way to structure this query that would be preferable? I generally dislike subqueries as they add another "dimension" to the query that increases runtime by polynomial factors.</p>