doushan1863 2011-07-21 05:00
浏览 67
已采纳

MySQL InnoDB - 避免为单个事务刷新日志缓冲区?

Is it possible to programmatically tell MySQL not to flush the log buffer immediately just for the current transaction, regardless of the innodb_flush_log_at_trx_commit setting?

Let's say you generally want ACID compliance so that your data is safe from any power/hardware faults. So you have innodb_flush_log_at_trx_commit = 1

But in your application, you have one particular INSERT query that needs to return quickly, and it's not as important for it to have the same level of integrity protection. Can you skip the flush (at the end of its transaction) just for that query/transaction? And can you do it programmatically, with an SQL query or something in PHP's PDO?

  • 写回答

2条回答 默认 最新

  • doudu5029 2011-07-25 05:06
    关注

    I think the answer is that it can't be done - unless you are willing to switch to MyISAM just for the particular table in question.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 求chat4.0解答一道线性规划题,用lingo编程运行,第一问要求写出数学模型和lingo语言编程模型,第二问第三问解答就行,我的ddl要到了谁来求了
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
  • ¥65 汇编语言除法溢出问题
  • ¥15 Visual Studio问题
  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果