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.
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.
MySQL(默认使用InnoDB引擎),将记录按照页的方式进行管理,每页大小默认为16K(这个值可以修改).linux 默认页大小为4K
linux内存页的默认大小是
3阶,包含2层索引,每个索引节点4bytes,最后一层要存数据,假设数据大小也是4bytes,最后一层一个叶子节点是 4+4 = 8 bytes
(4 * 1024 /4 ) * (4 * 1024 /4 ) * (4 * 1024 / 8) = 500 000 000 约为5亿key/value数据