Consider InnoDB whose page size is 16KB and suppose we have an index on a integer column of size 4bytes, so a node can contain at most 16 * 1024 / 4 = 4096 keys, and a node can have at most 4097 children.node
So for a B+tree of height 1, the root node has 4096 keys and the nodes at height 1 (the leaf nodes) have 4096 * 4097 = 16781312 key values.linux
InnoDB的性能ide
MySQL(默認使用InnoDB引擎),將記錄按照頁的方式進行管理,每頁大小默認爲16K(這個值能夠修改).linux 默認頁大小爲4K性能
linux內存頁的默認大小是4k.net
3階,包含2層索引,每一個索引節點4bytes,最後一層要存數據,假設數據大小也是4bytes,最後一層一個葉子節點是 4+4 = 8 bytes orm
(4 * 1024 /4 ) * (4 * 1024 /4 ) * (4 * 1024 / 8) = 500 000 000 約爲5億key/value數據blog