思路话语

。Arlen:思想有多远你就能走多远...

myisam中B-tree的说明

B-tree keys
The B-tree is a very common storage structure, and the subject has been treated in
great detail in many other publications; therefore, we will only briefly visit the
MyISAM B-tree. Those interested in more detail should refer to mi_key.c, mi_search.c,
mi_write.c, and mi_delete.c in the storage/myisam directory.


A MyISAM B-tree consists of leaf and nonleaf nodes, or pages. By default, each page
is 1,024 bytes. It can be changed by testing the myisam_block_size variable. You can
distinguish a nonleaf node from a leaf node by looking at the highest bit of the first
byte of the page. It will be set for a nonleaf node.


Both leaf and nonleaf nodes contain key values and pointers to the record positions
in the datafile. Nonleaf nodes additionally contain pointers to child nodes. Key val-
ues in a node may be compressed by replacing a common prefix with a referencing
pointer.

 

《understanding mysql internals》中关于myisam的b-tree说明就这么点。够精简,也够清楚。

posted on 2010-06-20 10:32  Arlen  阅读(280)  评论(0编辑  收藏  举报

导航