首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Postgresql扩展页检查-平均bt_metap

问Postgresql扩展页检查-平均bt_metap
EN

Database Administration用户
提问于 2017-09-17 21:57:04
回答 1查看 515关注 0票数 2

我正在使用Postgresql扩展页面检查。

有人能告诉我这些列的含义吗:魔术,版本,根,级别,快速根,bt_metap函数的快速级别。

此信息不在文档1[https://www.postgresql.org/docs/9.6/static/pageinspect.html]中显示。

B-树的高度(从根到叶最远处的节点位置),是列级吗?

请参阅下面的返回查询,该查询运行于名为idx_l_shipmodelineitem000的索引上。

代码语言:javascript
复制
------------------------------------------------------------------
postgres # SELECT * FROM bt_metap ('idx_l_shipmodelineitem000');
postgres # magic    | version   | root     | level | fastroot | fastlevel
postgres # 340322   | 2         | 41827 | 3       | 41827   | 3

诚挚的问候

EN

回答 1

Database Administration用户

发布于 2017-09-18 01:09:56

src/include/access/nbtree.h:

代码语言:javascript
复制
/*
 * 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/自述

票数 1
EN
页面原文内容由Database Administration提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://dba.stackexchange.com/questions/186165

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档