天天看點

mysql 性能參數 innodb_flush_log_at_trx_commit

每次innodb_flush_log_at_trx_commit 這個參數的幾個值表示的意思老是記不清,現在整理下來,友善檢視。

0 ---  每秒把Logbuffer的内容寫到日志檔案,并且Flash到磁盤。

1 ---  每次Commit的時候Flush到磁盤,這個是最安全的, 照理也是性能最差的。

2 ---  每次Commit就從Logbuffer刷到日志檔案,并且每秒從往磁盤刷。

1

2

3

4

5

6

<code>mysql&gt; show variables like </code><code>'innodb_flush_log_at_trx_commit'</code><code>;</code>

<code>+--------------------------------+-------+</code>

<code>| Variable_name                  | Value |</code>

<code>| innodb_flush_log_at_trx_commit | 1     |</code>

預設是1

本文轉自 暗黑魔君 51CTO部落格,原文連結:http://blog.51cto.com/clovemfong/1204756,如需轉載請自行聯系原作者

繼續閱讀