USA - Toll Free: +1-866-221-0634
USA - From abroad: +1-408-701-9009
USA - Subscription Renewals: +1-866-830-4410
Latin America: +1 512 535 7751
UK: +44 845 399 1124
Ireland: +353 1 6919191
Germany: +49 89 420 95 98 95
France: +33 1 70 38 72 00
Sweden: +46 730 207 871
Benelux: +358 50 5710 528
Italy: +39 06-99268193
Israel: +358 50 5710 528
Spain & Portugal: + 34 933905461
Other EMEA countries: +353 1 6919191
Asia Pacific: +81 3 5918 7507
Learn about new MySQL releases, technical articles, events and more.
If you compare the insert speeds of InnoDB and MyISAM, sometimes there might be quite a large performce difference. Compared to MyISAM, InnoDB performs additional safeguards to guarantee data integrity. This results in overhead that impacts performance. You can influence the amount of overhead by using the following configuration option: innodb_flush_log_at_trx_commit.
The default value is set to 1. This means that at a transaction commit the log is flushed to disk, and the modifications made by the transaction become permanent and will survive a database crash.
If you are willing to compromise this safety, and you are running small transactions, you may set this to 0 or to 2 to reduce disk I/O to the logs.
If you set the value to 0, InnoDB only writes to the log file and flushes it to disk, approximately once per second, or when the log buffer becomes full.
If the value is 2, then InnoDB writes the log to the log file at each commit, but only flushes the log file to disk approximately once per second.
Starting from MySQL 4.0.13, the default value of this parameter is 1. Previously, the default was 0.
