About this question
In SOQL, will there be any advantage if I use the “IN” operator instead of “NOT IN”? If there are any performance benefits, what are they? Or is SOQL not in the same as SOQL IN?
I have a use case in which I have to filter the records based on a certain column, for instance, Region, which has many different values. NOT IN is preferred because, for filtration, only a bit of those values will be used.
For example, let us consider that there are 10 different values in Region: 1. NJ 2. NY 3. …
10. CL. The NOT IN will only have, say, NJ and NY.
https://salesforce.stackexchange.com/questions/290567/soql-in-vs-not-in-operator