table2
needs INDEX(tableid, user_id)
(in either order).
If this does not solve the problem, please provide SHOW CREATE TABLE
for both tables, plus EXPLAIN SELECT ...
.
table2
needs INDEX(tableid, user_id)
(in either order).
If this does not solve the problem, please provide SHOW CREATE TABLE
for both tables, plus EXPLAIN SELECT ...
.