Use IN and EXIST in the Right Situations
I saw this in Marat’s article.
IN is efficient when most of the filter criteria is in the subquery.
EXISTS is efficient when most of the filter criteria is in the main query.
Don’t do this:
| |
Instead do this:
| |