mysql innodb的重要組件

來源:互聯網
上載者:User

標籤:div   mysq   lis   apt   提高   car   table   nod   flush   

innodb包涵如下幾個組件

 

一、innodb_buffer_pool

  1  它主要用來快取資料與索引(準確的講由於innodb中的表是由叢集索引組織的,所以資料只不是過主鍵這個索引的葉子結點)。

 

二、change buffer:

  1  如果更新語句要更新二級索引的記錄,但是記錄所在的頁面這個裡面並沒有在innodb_buffer_pool中,innodb會把這個對二級索引

  面頁的更新動作緩衝到innodb_buffer_pool的一個特定地區(change buffer);等到之後如果有別的事務B要去讀這個二級索引頁的時候,

  由於頁面還沒有,在innodb_buffer_pool中所以B事務會先把頁面載入innodb_buffer_pool,這樣子目標頁面就算進入innodb_buffer_pool了,

  接下來就可根據change buffer的內容來更新索引頁面了。這樣可以節約IO操作,提高效能。

  2  當然別的重新整理機(把change buffer中的變更落盤)制也是有的,比如說當mysql比較閒置時候,slow shutdown 的過程當中也會重新整理

  change buffer中的內容到磁碟

  3  監控change buffer 

show engine innodb status;-------------------------------------INSERT BUFFER AND ADAPTIVE HASH INDEX-------------------------------------Ibuf: size 1, free list len 0, seg size 2, 0 mergesmerged operations: insert 0, delete mark 0, delete 0discarded operations: insert 0, delete mark 0, delete 0Hash table size 34679, node heap has 0 buffer(s)Hash table size 34679, node heap has 0 buffer(s)Hash table size 34679, node heap has 0 buffer(s)Hash table size 34679, node heap has 0 buffer(s)Hash table size 34679, node heap has 0 buffer(s)Hash table size 34679, node heap has 0 buffer(s)Hash table size 34679, node heap has 0 buffer(s)Hash table size 34679, node heap has 0 buffer(s)0.00 hash searches/s, 0.00 non-hash searches/s---LOG---Log sequence number 24635311Log flushed up to   24635311Pages flushed up to 24635311Last checkpoint at  246353020 pending log flushes, 0 pending chkp writes10 log i/o‘s done, 0.00 log i/o‘s/second

 

    

 

----

mysql innodb的重要組件

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.