Very slow delete on mysql base with subquery
问题 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 entrys in text that I want to delete. DELETE FROM tname.text WHERE old_id IN (SELECT textid FROM spam); spam has just 2 columns, both are ints. 800K entries has a file size of several Mbs. Both ints are primary keys. text has 3 columns. id (prim key), text, flags. around 1200K entries, and around 2.1 gigabyte size (most spam). The