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
3654
July 04, 2005 08:43PM
2182
July 04, 2005 11:59PM
2287
July 05, 2005 10:45AM
2033
July 05, 2005 11:13AM
2018
July 05, 2005 11:57AM
2182
July 05, 2005 12:54PM
2105
July 06, 2005 11:18AM
2095
July 06, 2005 12:36PM
2040
July 07, 2005 11:14AM
2115
July 07, 2005 11:26AM
2010
July 07, 2005 03:11PM
Re: Most efficient update
2367
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.