📄 bt_minkey.so
字号:
m4_comment([$Id: bt_minkey.so,v 10.14 2000/03/18 21:43:08 bostic Exp $])m4_ref_title(Access Methods, Minimum keys per page,, am_conf/bt_prefix, am_conf/bt_recnum)m4_p([dnlThe number of keys stored on each page affects the size of a Btree andhow it is maintained. Therefore, it also affects the retrieval and searchperformance of the tree. For each Btree, m4_db computes a maximum keyand data size. This size is a function of the page size and the fact thatat least two key/data pairs must fit on any Btree page. Whenever key ordata items exceed the calculated size, they are stored on overflow pagesinstead of in the standard Btree leaf pages.])m4_p([dnlApplications may use the m4_refT(dbh_set_bt_minkey) to change the minimumnumber of keys that must fit on a Btree page from two to another value.Altering this value in turn alters the on-page maximum size, and can beused to force key and data items which would normally be stored in theBtree leaf pages onto overflow pages.])m4_p([dnlSome data sets can benefit from this tuning. For example, consider anapplication using large page sizes, with a data set almost entirelyconsisting of small key and data items, but with a few large items. Bysetting the minimum number of keys that must fit on a page, theapplication can force the outsized items to be stored on overflow pages.That in turn can potentially keep the tree more compact, that is, withfewer internal levels to traverse during searches.])m4_p([dnlThe following calculation is similar to the one performed by the Btreeimplementation. (The m4_bold(minimum_keys) value is multiplied by 2because each key/data pair requires 2 slots on a Btree page.)])m4_indent([maximum_size = page_size / (minimum_keys * 2)])m4_p([dnlUsing this calculation, if the page size is 8KB and the defaultm4_bold(minimum_keys) value of 2 is used, then any key or data itemslarger than 2KB will be forced to an overflow page. If an applicationwere to specify a m4_bold(minimum_key) value of 100, then any key or dataitems larger than roughly 40 bytes would be forced to overflow pages.])m4_p([dnlIt is important to remember that accesses to overflow pages do not performas well as accesses to the standard Btree leaf pages, and so setting thevalue incorrectly can result in overusing overflow pages and decreasingthe application's overall performance.])m4_page_footer
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -