Here is the step by step to change the distribution of table
1.create new table with random
2.rename the original table to new name
3.rename the new table to old name
4.drop the renamed original table or keep it.
create table NZ_DB1.nz_db1_TABLE_interim_oct4 as select * from NZ_DB1.nz_db1_TABLE DISTRIBUTE ON random ;
alter table NZ_DB1.nz_db1_TABLE rename to NZ_DB1.nz_db1_TABLE_orig_4oct17_bk;
alter table NZ_DB1.nz_db1_TABLE_interim_oct4 rename to NZ_DB1.nz_db1_TABLE;
drop table NZ_DB1.nz_db1_TABLE_orig_4oct17_bk;
No comments:
Post a Comment