MySQL Forums
Forum List  »  InnoDB

Re: Most efficient update
Posted by: Marko Mäkelä
Date: July 29, 2005 06:56AM

Mark,
currently, a DROP INDEX in MySQL is mapped to an ALTER TABLE, which in turn creates the table and all its indexes anew. This should be fixed in MySQL 5.1.

As for your original question, you could try splitting the UPDATE to smaller parts, e.g., add a condition WHERE primary_key BETWEEN xx AND yy. Remember to COMMIT the transaction after each UPDATE. If you want ACID safety, create another table that keeps track on the range being updated, and update that table within the same transaction.

Options: ReplyQuote


Subject
Views
Written By
Posted
3632
July 04, 2005 08:43PM
2173
July 04, 2005 11:59PM
2275
July 05, 2005 10:45AM
2022
July 05, 2005 11:13AM
2008
July 05, 2005 11:57AM
2171
July 05, 2005 12:54PM
2094
July 06, 2005 11:18AM
2083
July 06, 2005 12:36PM
2032
July 07, 2005 11:14AM
2099
July 07, 2005 11:26AM
1996
July 07, 2005 03:11PM
Re: Most efficient update
2320
July 29, 2005 06:56AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.