diilbert Posted February 1, 2008 Share Posted February 1, 2008 I am having a problem efficiently deleting 55k records from a table. Because of the complexity of the where clause I created a temp table with the appropriate primary ids, from the point I do the following: DELETE FROM articles USING articles, tmp_cleanup WHERE tmp_cleanup.article_id = articles.id; The tmp_cleanup table contains 55k records (article ids to be deleted) and the articles table is ~430MB w/ ~88K records, and I am going into the second hour and the query is still running. Any ideas on how to speed this up would be greatly appreicated. THANK! Quote Link to comment https://forums.phpfreaks.com/topic/88886-delete-using-multiple-tables/ Share on other sites More sharing options...
fenway Posted February 2, 2008 Share Posted February 2, 2008 Check the EXPLAIN output of the equivalent select. Quote Link to comment https://forums.phpfreaks.com/topic/88886-delete-using-multiple-tables/#findComment-456260 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.