【MySQL 5.7 Reference Manual】15.4.8 Undo Logs(Undo日志)

15.4.8 Undo Logs (Undo日志)

An undo log is a collection of undo log records associated with a single transaction. An undo log record contains information about how to undo the latest change by a transaction to a clustered index record. If another transaction needs to see the original data (as part of a consistent read operation), the unmodified data is retrieved from the undo log records. Undo logs exist within undo log segments, which are contained within rollback segments. By default, rollback segments are physically part of the system tablespace. However, rollback segments can reside in separate undo tablespaces. For more information, see Section 15.7.7, “Storing InnoDB Undo Logs in Separate Tablespaces”. For information about multi-versioning, see Section 15.3, “InnoDB Multi-Versioning”.

一个undo日志是与一次事务相关的undo日志记录的集合。一条undo日志记录所包含的信息是关于如何撤销最近通过事务对聚簇索引做出的变更。如果另一个事务需要看原始数据(作为一致性读取操作的一部分),未修改的数据会从undo日志记录取出。undo日志存在于undo日志段中,它同时也包含在回滚段中。在默认情况下,回滚段 物理上 是系统表空间的一部分。然而,回滚段可以驻留在单独的undo表空间中。更多信息,请参考15.7.7,“在单独的表空间中存储InnoDB Undo日志”。更多内容关于多版本,请参考15.3, “InnoDB多版本”。

InnoDB supports 128 rollback segments, 32 of which are reserved as non-redo rollback segments for temporary table transactions. Each transaction that updates a temporary table (excluding read-only transactions) is assigned two rollback segments, one redo-enabled rollback segment and one non-redo rollback segment. Read-only transactions are only assigned non-redo rollback segments, as read-only transactions are only permitted to modify temporary tables.

InnoDB支持128个回滚段,其中32个保留为临时表事务做non-redo回滚段。每一个更新临时表的事务(除了只读事务)会分配两个回滚段,一个redo-enabled回滚段和一个non-redo回滚段。只读事务只分配non-redo回滚段,因为只读事务只允许修改临时表。

This leaves 96 available rollback segments, each of which supports up to 1023 concurrent data-modifying transactions, for a total limit of approximately 96K concurrent data-modifying transactions. The 96K limit assumes that transactions do not modify temporary tables. If all data-modifying transactions also modify temporary tables, the total limit is approximately 32K concurrent data modifying transactions. For more information about rollback segments that are reserved for temporary table transactions, see Section 15.4.12.1, “InnoDB Temporary Table Undo Logs”.

这样剩下的96个可用回滚段,每一个都支持1023个的并发数据修改事务,总上限约96K个的并发数据修改事务。96K个上限是假设事务没有修改临时表。如果全部数据修改事务也修改了临时表,总上限是约32K个并发数据修改事务。更多信息关于为临时表事务保留的回滚段,请参考15.4.12.1,“InnoDB临时表Undo日志”。

The innodb_undo_logs option defines the number of rollback segments used by InnoDB.

innodb_undo_logs选项定义了InnoDB可用的回滚段数量。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值