前几文:http://space.itpub.net/9240380/viewspace-752465及
http://space.itpub.net/9240380/viewspace-752471测试了组合范围及列
表分区的知识要点,承沿之前系列,测试列表组合分区
---范围子分区
SQL> create table t_list(a int,b int)
2 partition by list(a)
3 subpartition by range(b)
4 subpartition template
5 (
6 subpartition sub1 values less than(5),
7 subpartition sub2 values less than(10)
8 )
9 (
10 partition p1 values(1,2,3,4,5),
11 partition p2 values(6,7,8,9,10)
12 )
13 /
Table created
---列表子分区
SQL> create table t_list(a int,b int)
2 partition by list(a)
3 subpartition by list(b)
4 subpartition template
5 (
6 subpartition sub1 values(1,2),
7 subpartition sub2 values(3,4)
8 )
9 (
10 partition p1 values(1,2,3,4,5),
11 partition p2 values(6,7,8,9,10)
12 )
13 /
Table created
---哈希子分区方法一
SQL> create table t_list(a int,b int)
2 partition by list(a)
3 subpartition by hash(b)
4 subpartition template
5 (
6 subpartition sub1,
7 subpartition sub2
8 )
9 (
10 partition p1 values(1,2,3,4,5),
11 partition p2 values(6,7,8,9,10)
12 )
13 /
Table created
---哈希子分区方法二
SQL> create table t_list(a int,b int)
2 partition by list(a)
3 subpartition by hash(b)
4 subpartitions 2
5 (
6 partition p1 values(1,2,3,4,5),
7 partition p2 values(6,7,8,9,10)
8 )
9 /
Table created