Oracle虚拟列子分区virtualcolumnpartition-创新互联
Oracle 11g 虚拟列子分区实验
成都创新互联是一家专注于成都网站建设、成都网站制作与策划设计,陇西网站建设哪家好?成都创新互联做网站,专注于网站建设十余年,网设计领域的专业建站公司;建站业务涵盖:陇西等地区。陇西做网站价格咨询:13518219792以下两个create 语句均为创建成功;
需求描述:
项目要求对3个字段进行分区,如时间,小时,还有个区域ID,便联想到虚拟列。
drop table test_part purge; create table test_part (t_time date, hour number, city_id number, hour_city varchar2(108) GENERATED ALWAYS AS(to_char(hour)||'|'||to_char(city_id))) partition by range(t_time) subpartition byhash(hour_city) (partition part_201705 values less than(to_date('20170601', 'yyyymmdd')) (subpartition subpart_201705_01, subpartition subpart_201705_02), partition part_201706 values less than (to_date('20170701', 'yyyymmdd')) (subpartition subpart_201706_01, subpartition subpart_201706_02)) create table test_part (t_time date, hour number(2), city_id number, day_hour varchar2(50) GENERATED ALWAYS AS (to_char(t_time,'yyyymmdd')||'|'||to_char(hour))) partition by range(day_hour) subpartition byhash(city_id) (partition part_201705 values less than('2017060100') (subpartition subpart_201705_01, subpartition subpart_201705_02), partition part_201706 values less than ('2017070100') (subpartition subpart_201706_01, subpartition subpart_201706_02))另外有需要云服务器可以了解下创新互联cdcxhl.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
当前题目:Oracle虚拟列子分区virtualcolumnpartition-创新互联
链接URL:http://scyanting.com/article/jgsoi.html