本文共 509 字,大约阅读时间需要 1 分钟。
gp_distribution_policy 记录了greenplum中一个表的分布策略,其实就是哪一个字段是分布键。
Table "pg_catalog.gp_distribution_policy"
Column | Type | Modifiers ----------+------------+----------- localoid | oid | not null attrnums | smallint[] |
这个表有两个字典,localoid 表示这个表的oid,attrnums表示这个表的那个字段序号列表,这个序号跟pg_attribute中的attnum一致,这个字段是一个列表,可以用逗号隔开做联合分布键。
当随机分布时distributed randomly的时候,列表为空。
aligputf8=# select * from gp_distribution_policy;
localoid | attrnums ----------+---------- 16505 | {1} 24610 | {1} 24630 | {1} 24683 | 24750 | {1} 24770 |
转载地址:http://seebi.baihongyu.com/