MySQL believes that a subquery is deduced when it is not!

EXPLAIN SELECT node_id 
          FROM node 
         WHERE person_id IN (SELECT person_id 
                               FROM user 
                              WHERE is_locked = 0);

MySql results telling me that this subquery has been received. But this is not so!

(I know this can easily be rewritten as a JOIN, but I want to know why MySQL considers this a dependent subquery.)

+5
source share
1 answer

This is a bug in MySQL Query Optimizer. It would seem that if the table in the subquery matches the table in the main query, it is considered a dependent subquery, even if this clearly should not be, and there is no simple fix. Sorry go to connect.

+3
source

All Articles