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.
Subject
Written By
Posted
September 03, 2006 01:22AM
September 04, 2006 02:13PM
September 04, 2006 09:31PM
September 05, 2006 11:39AM
September 05, 2006 12:47PM
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.