Optimise comparing data in two big MySQL tables
问题 How could I optimise query, which will find all records, which: have activation_request.date_confirmed not null and do not have related string value in another table: activation_request.email = user.username shouldn't return any record I tried: SELECT email FROM activation_request l LEFT JOIN user r ON r.username = l.email WHERE l.date_confirmed is not null AND r.username IS NULL and SELECT email FROM activation_request WHERE date_confirmed is not null AND NOT EXISTS (SELECT 1 FROM user WHERE