组合分区

10 篇文章 0 订阅
8 篇文章 0 订阅

组合分区是以区间分区、列表分区、散列分区组合而成。

纵向表头是:顶层分区机制

横向表头是:子分区机制,内容是支持版本


区间分区列表分区散列分区 
区间分区11g 1版本支持9i 2版本支持
9i 1版本支持
列表分区11g 1版本支持11g 1版本支持
11g 1版本支持
散列分区11g 2版本支持
11g 2版本支持
11g 2版本支持
创建表

--flashback table range_hash_example to before drop ;
drop table range_hash_example cascade constraints purge;
create table range_hash_example
(
range_key_date date,
hash_key number
)
partition by range(range_key_date)
subpartition by hash(hash_key) subpartitions 2
(
    partition composite_main_part1 values less than(to_date('2014-1-1','YYYY-MM-DD'))
    (
              subpartition composite_child1_part1 tablespace learn,
              subpartition composite_child1_part2 tablespace example
    ),
    partition composite_main_part2 values less than(to_date('2015-1-1','YYYY-MM-DD'))
    (
              subpartition composite_child2_part1 tablespace learn,
              subpartition composite_child2_part2 tablespace example
    ) 
);

查询分区信息:分区中子分区没有显示

SQL> select t.partition_name from user_tab_partitions t where t.table_name=upper('range_hash_example') ;
PARTITION_NAME
------------------------------
COMPOSITE_MAIN_PART1
COMPOSITE_MAIN_PART2

查询段信息:只有子分区才有段;组合分区没有分区段,只有子段。
SQL> select t.partition_name from user_segments t where t.segment_name=upper('range_hash_example');
PARTITION_NAME
------------------------------
COMPOSITE_CHILD1_PART1
COMPOSITE_CHILD1_PART2
COMPOSITE_CHILD2_PART1
COMPOSITE_CHILD2_PART2













  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值