更新时间:2022-06-13 GMT+08:00
表(Netezza)
分布键
DISTRIBUTE ON (column)迁移为DISTRIBUTE BY HASH (column)。
Netezza语法 |
迁移后语法 |
---|---|
CREATE TABLE N_AG_AMT_H ( AG_NO national character varying(50) not null, AG_CATEG_CD national character varying(12) not null, AMT_TYPE_CD national character varying(12) not null, DATA_START_DT date not null, CCY_CD national character varying(3) not null, DATA_END_DT date ) DISTRIBUTE ON (AG_NO, AG_CATEG_CD, AMT_TYPE_CD) ORGANIZE ON (AG_CATEG_CD, AMT_TYPE_CD, DATA_END_DT) ; |
CREATE TABLE N_AG_AMT_H ( AG_NO national character varying(50) not null, AG_CATEG_CD national character varying(12) not null, AMT_TYPE_CD national character varying(12) not null, DATA_START_DT date not null, CCY_CD national character varying(3) not null, DATA_END_DT date ) WITH(ORIENTATION=COLUMN) DISTRIBUTE BY HASH (AG_NO, AG_CATEG_CD, AMT_TYPE_CD) /* ORGANIZE ON (AG_CATEG_CD, AMT_TYPE_CD, DATA_END_DT) */ ; |
ORGANIZE ON
ORGANIZE ON需加注释。
Netezza语法 |
迁移后语法 |
---|---|
CREATE TABLE N_AG_AMT_H ( AG_NO national character varying(50) not null, AG_CATEG_CD national character varying(12) not null, AMT_TYPE_CD national character varying(12) not null, DATA_START_DT date not null, CCY_CD national character varying(3) not null, DATA_END_DT date ) DISTRIBUTE ON (AG_NO, AG_CATEG_CD, AMT_TYPE_CD) ORGANIZE ON (AG_CATEG_CD, AMT_TYPE_CD, DATA_END_DT) ; |
CREATE TABLE N_AG_AMT_H ( AG_NO national character varying(50) not null, AG_CATEG_CD national character varying(12) not null, AMT_TYPE_CD national character varying(12) not null, DATA_START_DT date not null, CCY_CD national character varying(3) not null, DATA_END_DT date ) WITH(ORIENTATION=COLUMN) DISTRIBUTE BY HASH (AG_NO, AG_CATEG_CD, AMT_TYPE_CD) /* ORGANIZE ON (AG_CATEG_CD, AMT_TYPE_CD, DATA_END_DT)*/ ; |
大字段类型
行存储支持BLOB 和CLOB。列存储不支持BLOB,仅支持CLOB。
Netezza语法 |
迁移后语法 |
---|---|
CREATE TABLE prod ( prod_no number(6) not null, prod_name national character varying(32) not null, prod_desc clob, prod_image blob ) DISTRIBUTE ON (prod_no, prod_name) ORGANIZE ON (prod_no, prod_name) ; |
CREATE TABLE prod ( prod_no number(6) not null, prod_name national character varying(32) not null, prod_desc clob, prod_image bytea ) WITH(ORIENTATION=COLUMN) DISTRIBUTE BY HASH (prod_no, prod_name) /* ORGANIZE ON (prod_no, prod_name) */ ; |
父主题: Netezza语法迁移