hash分区表怎么增加分区?
[@more@]hash分区表怎么增加分区,下面是我的建表语句,表中有千万级别的数据,希望不影响数据
drop table test;
CREATE TABLE test (
acc CHAR(19) NOT NULL
...............
open_inst
..................
) INITRANS 30 PARTITION BY HASH (acc)
(PARTITION P1 TABLESPACE users
,
PARTITION P2 TABLESPACE users
) ;
CREATE UNIQUE INDEX idxxp_abcdtest ON test
(
acc ASC
) INITRANS 50 LOCAL
(PARTITION P1
TABLESPACE users
,
PARTITION P2
TABLESPACE users
)
;
CREATE INDEX XAK4test ON test
(
open_inst ASC
) INITRANS 50 TABLESPACE users
;
答复如下:
alter table test add partition p3 tablespace users;
alter table test add partition p4 tablespace users;
alter table test add partition p5 tablespace users;
alter table test add partition p6 tablespace users;
alter table test add partition p7 tablespace users;
alter table test add partition p8 tablespace users;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/44871/viewspace-823746/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/44871/viewspace-823746/