Database Reference
In-Depth Information
14 PARTITION part_2
15 VALUES LESS THAN(to_date('01/01/2015','dd/mm/yyyy'))
16 (subpartition part_2_sub_1 values ( 1, 3 ),
17 subpartition part_2_sub_2 values ( 5, 7 ),
18 subpartition part_2_sub_3 values ( 2, 4, 6, 8 )
19 )
20 )
21 /
Table created.
Here you end up with five partitions altogether: two subpartitions for partition PART_1 and three for
partition PART_2 .
Row Movement
You might wonder what would happen if the value of the column used to determine the partition is modified in any of
the preceding partitioning schemes. There are two cases to consider:
The modification would not cause a different partition to be used; the row would still belong
in this partition. This is supported in all cases.
The modification would cause the row to
move across partitions. This is supported if row
movement is enabled for the table; otherwise, an error will be raised.
We can observe these behaviors easily. In the previous example in the Range Partitioning section, we inserted a
pair of rows into PART_1 of the RANGE_EXAMPLE table:
EODA@ORA12CR1> CREATE TABLE range_example
2 ( range_key_column date,
3 data varchar2(20)
4 )
5 PARTITION BY RANGE (range_key_column)
6 ( PARTITION part_1 VALUES LESS THAN
7 (to_date('01/01/2014','dd/mm/yyyy')),
8 PARTITION part_2 VALUES LESS THAN
9 (to_date('01/01/2015','dd/mm/yyyy'))
10 )
11 /
Table created.
EODA@ORA12CR1> insert into range_example
2 ( range_key_column, data )
3 values
4 ( to_date( '15-dec-2013 00:00:00',
5 'dd-mon-yyyy hh24:mi:ss' ),
6 'application data...' );
1 row created.
 
Search WWH ::




Custom Search