pg_statistic_ext_data
是一个包含扩展规划器统计数据信息的系统目录表,这些统计数据在pg_statistic_ext
中定义。
pg_statistic_ext_data
在PostgreSQL 12中添加。
按PostgreSQL版本定义
pg_statistic_ext_data (PostgreSQL 17)
Table "pg_catalog.pg_statistic_ext_data" Column | Type | Collation | Nullable | Default ------------------+-----------------+-----------+----------+--------- stxoid | oid | | not null | stxdinherit | boolean | | not null | stxdndistinct | pg_ndistinct | C | | stxddependencies | pg_dependencies | C | | stxdmcv | pg_mcv_list | C | | stxdexpr | pg_statistic[] | | | Indexes: "pg_statistic_ext_data_stxoid_inh_index" PRIMARY KEY, btree (stxoid, stxdinherit)
pg_statistic_ext_data (PostgreSQL 16)
Table "pg_catalog.pg_statistic_ext_data" Column | Type | Collation | Nullable | Default ------------------+-----------------+-----------+----------+--------- stxoid | oid | | not null | stxdinherit | boolean | | not null | stxdndistinct | pg_ndistinct | C | | stxddependencies | pg_dependencies | C | | stxdmcv | pg_mcv_list | C | | stxdexpr | pg_statistic[] | | | Indexes: "pg_statistic_ext_data_stxoid_inh_index" PRIMARY KEY, btree (stxoid, stxdinherit)
pg_statistic_ext_data (PostgreSQL 15)
Table "pg_catalog.pg_statistic_ext_data" Column | Type | Collation | Nullable | Default ------------------+-----------------+-----------+----------+--------- stxoid | oid | | not null | stxdinherit | boolean | | not null | stxdndistinct | pg_ndistinct | C | | stxddependencies | pg_dependencies | C | | stxdmcv | pg_mcv_list | C | | stxdexpr | pg_statistic[] | | | Indexes: "pg_statistic_ext_data_stxoid_inh_index" PRIMARY KEY, btree (stxoid, stxdinherit)
pg_statistic_ext_data (PostgreSQL 14)
Table "pg_catalog.pg_statistic_ext_data" Column | Type | Collation | Nullable | Default ------------------+-----------------+-----------+----------+--------- stxoid | oid | | not null | stxdndistinct | pg_ndistinct | C | | stxddependencies | pg_dependencies | C | | stxdmcv | pg_mcv_list | C | | stxdexpr | pg_statistic[] | | | Indexes: "pg_statistic_ext_data_stxoid_index" PRIMARY KEY, btree (stxoid)
pg_statistic_ext_data (PostgreSQL 13)
Table "pg_catalog.pg_statistic_ext_data" Column | Type | Collation | Nullable | Default ------------------+-----------------+-----------+----------+--------- stxoid | oid | | not null | stxdndistinct | pg_ndistinct | C | | stxddependencies | pg_dependencies | C | | stxdmcv | pg_mcv_list | C | | Indexes: "pg_statistic_ext_data_stxoid_index" UNIQUE, btree (stxoid)
pg_statistic_ext_data (PostgreSQL 12)
Table "pg_catalog.pg_statistic_ext_data" Column | Type | Collation | Nullable | Default ------------------+-----------------+-----------+----------+--------- stxoid | oid | | not null | stxdndistinct | pg_ndistinct | C | | stxddependencies | pg_dependencies | C | | stxdmcv | pg_mcv_list | C | | Indexes: "pg_statistic_ext_data_stxoid_index" UNIQUE, btree (stxoid)
变更历史
- PostgreSQL 15
- 添加列
stxdinherit
(提交269b532a)
- 添加列
- PostgreSQL 14
- 添加列
stxdexpr
(提交a4d75c86)
- 添加列
- PostgreSQL 12
- 添加 (提交6cbfb784)
参考文献
- PostgreSQL文档: pg_statistic_ext_data