MySql:If 我设置binlog格式为行,dose change buffer还有效吗?
MySql:If i set binlog format to row,dose change buffer still valid?
当我使用“语句”binlog 和非唯一索引时,mysql 将使用“更改缓冲区”避免从磁盘读取。
但是如果设置binlog格式为“行”,binlog需要行中的所有列,所以mysql必须从disk.So读取,这种情况下“change buffer”无效吗?
基于mysql doc:
The change buffer is a special data structure that caches changes to
secondary index pages when those pages are not in the buffer pool. The
buffered changes, which may result from INSERT, UPDATE, or DELETE
operations (DML), are merged later when the pages are loaded into the
buffer pool by other read operations.
该文档已经非常清楚地表明 change buffer
可用于 non-unique secondary index
。
返回行格式的binlog,不会影响change buffer
。因为对于 insert
、update
和 delete
,虽然 binlog
需要行中的所有列,但这些数据可以从簇索引和所有 non-unique 中获取索引仍然可以从 change buffer
.
中受益
实施:
change buffer
is used to avoid too many random disk read. redo log
is used to avoid too many random disk write.
当我使用“语句”binlog 和非唯一索引时,mysql 将使用“更改缓冲区”避免从磁盘读取。 但是如果设置binlog格式为“行”,binlog需要行中的所有列,所以mysql必须从disk.So读取,这种情况下“change buffer”无效吗?
基于mysql doc:
The change buffer is a special data structure that caches changes to secondary index pages when those pages are not in the buffer pool. The buffered changes, which may result from INSERT, UPDATE, or DELETE operations (DML), are merged later when the pages are loaded into the buffer pool by other read operations.
该文档已经非常清楚地表明 change buffer
可用于 non-unique secondary index
。
返回行格式的binlog,不会影响change buffer
。因为对于 insert
、update
和 delete
,虽然 binlog
需要行中的所有列,但这些数据可以从簇索引和所有 non-unique 中获取索引仍然可以从 change buffer
.
实施:
change buffer
is used to avoid too many random disk read.redo log
is used to avoid too many random disk write.