亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

沒聽懂innodb_fulsh_log_at_trx_commit 值為0和2的區別是啥

好像都是一秒以后刷新到磁盤,是2會先刷到緩存里么,那0的時候一秒以后直接刷磁盤?

正在回答

2 回答

0和2都是每秒從緩沖區寫入文件一次。區別是commit操作時,0不做任何操作,為2 的時候,commit時會把緩沖區內容寫入文件。文檔上是這么寫的:If the value of innodb_flush_log_at_trx_commit is 0, the log buffer is written out to the log file once per second and the flush to disk operation is performed on the log file, but nothing is done at a transaction commit.. When the value is 2, the log buffer is written out to the file at each commit, but the flush to disk operation is not performed on it. However, the flushing on the log file takes place once per second also when the value is 2.

0 回復 有任何疑惑可以回復我~
#1

英寧 提問者

非常感謝!
2017-03-21 回復 有任何疑惑可以回復我~

0是每秒刷一次磁盤,1是每一個事務提交后都要刷一次磁盤,2是提交事務后記錄但是不刷盤。

0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

沒聽懂innodb_fulsh_log_at_trx_commit 值為0和2的區別是啥

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號