database has such a table User and a user"s log table User_log
want to query the user according to the log, so the user has such a sql
SELECT * FROM (SELECT * FROM User_log Order By create_time LIMIT 0, 50) JOIN User ON User.user_id=User_log.user_id
the idea of this sql is that the User table is very large, so the direct subquery first finds 50 log and then connects the table to the user information, but it turns out that there is a problem with the efficiency. Explain later found that the execution order of mysql did not find 50 items before join as I imagined, but join first and then check, resulting in the User table being traversed. Excuse me, why is this?
PS:
1.mysql5.6.16
2.sqlmysql5.6.33
3.log