What is a B-tree page
I think I know what a B-tree is but what is a B-tree开发者_如何转开发 page?
B-trees are a common data structure for very large collections, such as found in databases. They are often too large to be held in memory at once, so they are stored in a file on disk, and only the portions necessary for the current operation are read into memory.
A piece of data that is stored to disk (and read into memory) as a unit is called a page. It is typical for a B-tree to store the number of records in a single node that make the node size equal to the natural page size of the file-system. In this way, the disk acceses can be optimized.
For example, if the file system naturally operates on 16 kb blocks of data, and if the size of the records in the B-tree is 500 b (including the links to the next level of nodes) then 32 records could be stored in the node, making the node size equal to the page size, and allowing the disk accesses to be optimized.
B-tree is a tree with n-arity, so page is exactly 'n' cells to accommodate elements from current node and them reference down. For B+ tree it can be as meta-nodes (that keeps only references) and leaf-nodes to store data.
精彩评论