发布网友 发布时间:2022-04-07 22:56
共3个回答
热心网友 时间:2022-04-08 00:25
要看应用的运行环境,如果是在线运营的生产系统,最好一个月建一次,每次40天左右。热心网友 时间:2022-04-08 01:43
生产库是每天跑数据前第一步建分区,意思是每天建一个分区
热心网友 时间:2022-04-08 03:18
用月份为主分区 用日期为子分区 对 数据应该是没有什么影响 。追问子分区的写法能告诉一下么?追答分区表语句:
CREATE TABLE DM_RPT_M_TELECOM_WWW_DEV (
MONTH_NO VARCHAR2(6) NOT NULL, --月份
PROV_ID VARCHAR2(3) NOT NULL, --省份 你可以直接改成日期
VALUE1 VARCHAR2(20),
VALUE2 VARCHAR2(20),
VALUE3 VARCHAR2(20),
VALUE4 VARCHAR2(20),
VALUE5 VARCHAR2(20),
VALUE6 VARCHAR2(20),
VALUE7 VARCHAR2(20)
)
PARTITION BY RANGE (MONTH_NO)
SUBPARTITION BY LIST (PROV_ID)
SUBPARTITION TEMPLATE(
SUBPARTITION SUBPART_010 VALUES ('010'),
SUBPARTITION SUBPART_011 VALUES ('011'),
·····························································,
SUBPARTITION SUBPART_097 VALUES ('097'),
SUBPARTITION SUBPARTDEFAULT VALUES (DEFAULT)
)
(
PARTITION PART_201001 VALUES LESS THAN ('201002'),
PARTITION PART_201002 VALUES LESS THAN ('201003'),
············· ·····························································,
PARTITION PART_201012 VALUES LESS THAN ('201101')
) ;