Updated on 2024-12-09 GMT+08:00

Tables

Distribution Key

DISTRIBUTE ON (column) should be migrated to DISTRIBUTE BY HASH (column).

Netezza Syntax

Syntax After Migration

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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)
;
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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 will be commented out.

Netezza Syntax

Syntax After Migration

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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) 
;
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
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)*/
;

Large Field Type

The row-store supports BLOB and CLOB. Column storage does not support BLOB, but it supports CLOB.

Netezza Syntax

Syntax After Migration

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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) 
 ;
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
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) */ 
 ;