首页 > 数据库 > > Greenplum创建表



1、二维表同样是GP中重要的数据存储对象,为了更好的支持数据仓库海量数据的访问,GP的存储方式可以分为
面向行存储的普通堆积表
面向列存储的AOT表(append only table)
AOT表也可以是按行存储的,但是按列存储必须是AOT表,如经常更新数据,或者较小的维度数据,应该使用普通堆积表存储。
2、普通堆积表创建
create table student(
id character varing(30),
xm character varing(20),
xh character varing(20),
bj character varing(20)
)
distributed by (id);
comment on table student is '学生表';
comment on column student.id is '主键id';
comment on column student.xm is '姓名';
comment on column student.xh is '学号';
comment on column student.bj is '班级';3、分布键(哈希键)
才华不溢,梦想依旧
唯心沉淀,遨游宇宙
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69953058/viewspace-3138215/ ,如需转载,请注明出处,否则将追究法律责任。