Thursday, May 7, 2009

Multiple Column PartitioningAs the name suggests we can define the partition key using multiple column in the table.So basically if there are two columns which you would like to use to define partitioning to facilitate related data to be stored in the same partition. There are be more than 2 columns for defining column keys. The idea is if using the first column key oracle is not able to ascertain which partition it has to go into, it used the second key and like-wise. The reason why oracle is not able to define the correct partition could be because the partition bound values are overlapping, between partitions.

So you can see that the insert statement no. 2, had the second value as 15, but it went into partition 1, as it was table to decide using the first value. But the last insert statement had the first value as 10, which is the partition bound value for 1st and 2nd partition, so the row used the second value i.e. 12, and inserted the row in partition 2.