excuse me: I rewrote the join of mysql into two, but the where condition encountered a problem
for example:
sql = select * from order o join user u on u.user_id = o.user_id where u.type = "Wechat Registration"
because the user table has been moved to another database and can only be accessed through the API.
split into:
sql1 = select user_id from user where type = "Wechat Registration";
sql2 = select * from order where user_id in (user_id extracted by sql1) limit 20 offset 0
when there is more and more data in the user table, there are tens of thousands of user_id fetched by sql1, so in sql2, user_id in (tens of thousands) is too slow to query. Is there any way to optimize it?