4 ms·
No. 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.
by jswinghammer 15y ago
No. 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.