Hi,

InnoDB provides MySQL with a transaction-safe (ACID compliant) storage engine 
that has commit, rollback, and crash recovery capabilities. MyISAM, the default 
storage engine.  Unless compiled with InnoDB, MySQL is not ACID compliant.

When innodb_flush_log_at_trx_commit

=0  the log buffer is written  to disk and nothing to be done at transaction 
commit
=1 [default]  the log buffer is written to disk on each transaction commit
=2   log buffer is written on each commit and no flush performed

However, the flushing on the log file to the disk takes place once per second 
also when the value is 2. You can achieve better performance by setting the 
value different from 1, but then you can lose at most one second worth of 
transactions in a crash.  If you set the value to 0, then any mysqld process 
crash can erase the last second of transactions.   If you set the value to 2, 
then only an operating system crash or a power outage can erase the last second 
of transactions.

Ref: http://dev.mysql.com/doc/refman/5.0/en/innodb-parameters.html

Thanks
ViSolve DB Team

----- Original Message ----- 
From: "Ratheesh K J" <[EMAIL PROTECTED]>
To: <mysql@lists.mysql.com>
Sent: Tuesday, August 29, 2006 10:16 AM
Subject: what should be the value of innodb_flush_log_at_trx_commit


hello all,

We do not run transactions at all on our db. All our queries are autocommit. So 
what should be the value set to this variable : innodb_flush_log_at_trx_commit

We currently have it set to 1 and all our tables are Innodb. Since we are not 
running any transactions at all, is it better to set this var to 0 or 2?

Thanks,

Ratheesh Bhat K J

Reply via email to