Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle virtual column subpartition virtual column partition

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Oracle 11g virtual column sub-partition experiment

The following two create statements are created successfully

Requirements description:

The project requires three fields to be partitioned, such as time, hour, and an area ID, which is associated with a virtual column.

Drop table test_part purge Create table test_part (t_time date, hour number, city_id number, hour_city varchar2) 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) (to_char) (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))

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report