Optimization of Notin and Minus use in mysql
When optimizing sql, we need to change our thinking and rewrite sql equivalently;
The rewritten sql has undergone earth-shaking changes due to logical reading, and the results are quickly obtained.
There is a function in the first sql execution plan, LNNVL("A"."APP_ID"<>:B1), lnnvl(exp)
If the result of exp is false or unknown, then lnnvl returns true;
If the result of exp is true, return false.