A mysql query that is taking too much to be executed(and it shouldn't)
Hi to everybody.
I'm realizing a mailserver with a not common configuration...
Anyway I've a problem with a mysql query, that is taking too much time to be executed...
Basically the two tables involved in that query are:
and the query is this one:
SELECT * FROM mail_db WHERE mail_db.user_id = 21 AND mail_db.uidl NOT IN (SELECT uidl FROM mail_temp WHERE user_id = 21);
I'm sure that I'm wrong in something and that's why is taking too much to be executed...