Beware of big rollbacks of mass inserts: InnoDB uses the insert buffer to save disk I/O in inserts, but no such mechanism is used in a corresponding rollback. A disk-bound rollback can take 30 times as long to perform as the corresponding insert. Killing the database process does not help because the rollback starts again on server startup. The only way to get rid of a runaway rollback is to increase the buffer pool so that the rollback becomes CPU-bound and runs fast, or to use a special procedure. See Section 13.6.6.2, “Forcing InnoDB Recovery”. 问下 A disk-bound rollback can take 30 times as long to perform as the corresponding insert。中的30 times 是啥意思?难道有30次的rollback?该怎么理解?

解决方案 »

  1.   

    InnoDB uses the insert buffer to save disk I/O in inserts, but no such mechanism is used in a corresponding rollback相应的inserts没有insert buffer,需要进行disk I/0交互
      

  2.   


    后面半句,明白意思了,但是为什么innodb没有rollback的缓冲区内存呢,oracle好像就有啊!
      

  3.   


    可能innodb还不够完善吧嗯,Oralce有回滚段
      

  4.   

    就是30倍啊,一个使用buffer,一个不使用buffer, 差别肯定很明显。