This mysql query is running for around 10 hours and has not finished. Something is horribly wrong.
Two tables (text and spam) are here. Spam stores the ids of spam e
In my experience sub queries are often a cause of slow execution times in SQL statements, therefor I try to avoid them. Try this:
DELETE tname FROM tname INNER JOIN spam ON (tname.old_id = spam.textid);
Disclaimer: This query is not tested, make backups first! :-)