For questions pertaining to the measurement or improvement of a query (that deals with speed).

- Stackoverflow.com Wiki
1 articles, 0 books.

Instead of NOT IN, use a correlated NOT EXISTS for this query pattern. Always. Other methods may rival it in terms of performance, when all other variables are the same, but all of the other methods introduce either performance problems or other challenges.