MySQL的InnoDB存儲引擎中,緩衝池中的Changer Buffer與系統表空間中的Changer Buffer的關係

MySQL的InnoDB存儲引擎中,緩衝池中和系統表空間中都存在Changer Buffer,那它們之間的關係是怎樣的呢?先來一張InnoDB存儲引擎的架構圖:

在這裏插入圖片描述
翻閱了MySQL官網發現如下:

1、https://dev.mysql.com/doc/refman/5.7/en/innodb-change-buffer.html
這裏面有一句話:

 In memory, the change buffer occupies part of the buffer pool. On disk, the change buffer is part of the system tablespace, where index changes are buffered when the database server is shut down.

在內存中,change buffer是獨立的,但是最終在系統空閒的時候merge到buffer pool中。
在磁盤上,change buffer是系統表空間的一部分,作爲內存數據的備份。

2、另外可以參考:
https://dev.mysql.com/doc/refman/5.7/en/faqs-innodb-change-buffer.html

系統表空間中的change buffer是內存緩衝池中change buffer的備份,也就是說被持久化到了系統表空間中。在崩潰恢復的時候會從系統表空間的change buffer中讀取信息到buffer pool。

A change buffer merge is performed during crash recovery. Changes are applied from the change buffer (in the system tablespace)  to leaf pages of secondary indexes as index pages are read into the buffer pool.

The change buffer is fully durable and will survive a system crash. Upon restart, change buffer merge operations resume as part of normal operations.
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章