DB2使用收集
db2命令收集
创建带分区的表:
create table table_name(
)in table_space index in index_space
partition by range(col_name)
(STARTING MINVALUE,
STARTING '1/1/1999' ENDING '12/31/2020' EVERY 1 YEAR ,
ENDING MAXVALUE)
-- 该方法创建出来的表无法添加多余分区,分区已分配满
查看表分区:db2 describe data partitions for table xxx;
添加表分区:db2 "alter table TABLENAME add partition starting '1/1/1991' ending '12/31/1991'"