The results of the mysql in function are different from expected. After the exception of null is processed several times, the number of accounts in the game reaches. Some operations on the whole point lead to slow server response. Later, I found that, as developers, there is no need to store accounts without actual content. For games, there is no need to store accounts without roles. After all, some accounts with roles cannot even reach 1%. So I decided to delete these accounts with no roles. Select count (*) from user; + ---------- + | count (*) | + ---------- + | 1004897 | + ---------- + select count (*) from player; + ---------- + | count (*) | + ---------- + | 57342 | + ---------- + delete from user where id not in (select user_id from player) + ---------- + | count (*) | + ---------- + | 0 | + ---------- + I am confused about the problem, because the user id and the player user_id are unique and I accidentally think of null. Check whether the select user_id from player contains null, resulting in an exception in the result. After deleting the record, everything is normal. It seems that null is not close to the language, which requires special consideration. It is also a special case in the database ..