4 ms·
I wonder if NOT NOT IN would have solved it since he mentions the problem doesn't exist for NOT IN.
by Hawramani 15y ago
I wonder if NOT NOT IN would have solved it since he mentions the problem doesn't exist for NOT IN.
- jswinghammer 15y agoNo. MySQL is able to optimize an anti-join but not the IN condition. It works about the same as having a LEFT JOIN with a not is null check in the where clause. MySQL will see NOT NOT IN as just IN.
- Hawramani 15y agoWould using parentheses (NOT(NOT IN...)) make a difference?
- jswinghammer 15y agoUsing NOT NOT IN is a syntax error in any event. I was answering in the hypothetical in any event.
- Hawramani 15y agoAh I see. Thanks for the answer.