Jump to content

DELETE USING multiple tables


diilbert

Recommended Posts

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!

Link to comment
https://forums.phpfreaks.com/topic/88886-delete-using-multiple-tables/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.