GreenPlum改变表的分布策略
来源:互联网 发布:ping ip加端口 编辑:程序博客网 时间:2024/04/27 04:30
创建一张表,在没有primary key 或者 unique key 的情况下,GreenPlum默认会把第一个column作为分布键
zwcdb=# create table tab01(id int,name varchar(20));NOTICE: Table doesn't have 'DISTRIBUTED BY' clause -- Using column named 'id' as the Greenplum Database data distribution key for this table.HINT: The 'DISTRIBUTED BY' clause determines the distribution of data. Make sure column(s) chosen are the optimal data distribution key to minimize skew.CREATE TABLEzwcdb=# zwcdb=# \d+ tab01 Table "public.tab01" Column | Type | Modifiers | Storage | Description --------+-----------------------+-----------+----------+------------- id | integer | | plain | name | character varying(20) | | extended | Has OIDs: noDistributed by: (id)
使用以下语句修改分布键
zwcdb=# alter table tab01 set distributed by(name);ALTER TABLEzwcdb=# \d+ tab01 Table "public.tab01" Column | Type | Modifiers | Storage | Description --------+-----------------------+-----------+----------+------------- id | integer | | plain | name | character varying(20) | | extended | Has OIDs: noDistributed by: (name)
zwcdb=# alter table tab01 set distributed randomly;ALTER TABLEzwcdb=# alter table tab01 set with(reorganize=true);ALTER TABLEzwcdb=# \d+ tab01 Table "public.tab01" Column | Type | Modifiers | Storage | Description --------+-----------------------+-----------+----------+------------- id | integer | | plain | name | character varying(20) | | extended | Has OIDs: noDistributed randomly
0 0
- GreenPlum改变表的分布策略
- GreenPlum改变表的分布策略
- GreenPlum改变表的分布策略
- GREENPLUM的分布与分区
- GREENPLUM的分布与分区
- 如何解决Greenplum pg_dump备份时的分布策略缺失等问题
- GreenPlum的并行查询优化策略
- GreenPlum的并行查询优化策略
- 转载:GreenPlum的并行查询优化策略
- GreenPlum的并行查询优化策略
- 查看greenplum库各个节点数据的分布情况
- greenplum 分区和分布键
- cassandra的数据分布和副本策略
- 数据分布的六种策略
- 分布式文件系统的副本分布策略
- GPDB查看表分布策略信息
- greenplum-分布键性能小测试
- RedHat6.x伪分布安装Greenplum
- 添加一个能够自适应字数的UILabel对象到ScrollView
- cocos2d-x酱油笔记之获取系统时间
- 一些好用的Linux命令工具
- 怎样获得软件的版本信息
- 2.3-系列习题总结
- GreenPlum改变表的分布策略
- 拷贝string至输出流
- RAC修改数据库的spfile位置
- html中的块元素(block element)和内联元素(inline element)
- C#中winform窗体常用设置
- 传智学习日志篇:五
- asihttprequest old了,用afnetworking把!
- 使用git管理远程仓库
- 如何通过域名获得IP地址(linux)