MySQL Forums
Forum List  »  Perl

Re: Insertion takes very very long time
Posted by: Bill Karwin
Date: September 05, 2006 03:25PM

Sure. Autocommit means that the transaction is committed after every statement. This can cause some overhead that slows down operations. For instance, InnoDB flushes changes to disk after every commit. So if you have N commits for N statements, it needs to write to disk N times. There's a certain minimum time it takes to write to the disk, which is orders of magnitude slower than writing to RAM. So there's an advantage to grouping statements in transactions.

Read the chapter in the MySQL manual on performance -- it's really full of useful tips. I don't want to spend a lot of time here duplicating that content.

Regards,
Bill K.

Options: ReplyQuote


Subject
Written By
Posted
Re: Insertion takes very very long time
September 05, 2006 03:25PM


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.