我正在使用Postgresql扩展页面检查。
有人能告诉我这些列的含义吗:魔术,版本,根,级别,快速根,bt_metap函数的快速级别。
此信息不在文档1[https://www.postgresql.org/docs/9.6/static/pageinspect.html]中显示。
B-树的高度(从根到叶最远处的节点位置),是列级吗?
请参阅下面的返回查询,该查询运行于名为idx_l_shipmodelineitem000的索引上。
------------------------------------------------------------------
postgres # SELECT * FROM bt_metap ('idx_l_shipmodelineitem000');
postgres # magic | version | root | level | fastroot | fastlevel
postgres # 340322 | 2 | 41827 | 3 | 41827 | 3诚挚的问候
发布于 2017-09-18 01:09:56
src/include/access/nbtree.h:
/*
* The Meta page is always the first page in the btree index.
* Its primary purpose is to point to the location of the btree root page.
* We also point to the "fast" root, which is the current effective root;
* see README for discussion.
*/
typedef struct BTMetaPageData
{
uint32 btm_magic; /* should contain BTREE_MAGIC */
uint32 btm_version; /* should contain BTREE_VERSION */
BlockNumber btm_root; /* current root location */
uint32 btm_level; /* tree level of the root page */
BlockNumber btm_fastroot; /* current "fast" root location */
uint32 btm_fastlevel; /* tree level of the "fast" root page */
} BTMetaPageData;所以我建议你读src/后端/access/nbtree/自述
https://dba.stackexchange.com/questions/186165
复制相似问题