Swaminathan K
asked on
Oracle table partitions
Hi,
Iam working on oracle table partitions and need to provide a training on the types of partitions , I need the below information in regard to oracle hash partition
1. How does hash linear algorithm work , any example should be fine. I need an detailed explanation on how oracle applies Linear hash algorithm for each table partition using HASH .
Iam working on oracle table partitions and need to provide a training on the types of partitions , I need the below information in regard to oracle hash partition
1. How does hash linear algorithm work , any example should be fine. I need an detailed explanation on how oracle applies Linear hash algorithm for each table partition using HASH .
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks a lot , gave me an good idea about partitions in oracle.
ASKER
Can you explain me how the partitions are derived using the steps mentioned in the url above
I have followed the below steps to validate the Linear HASH algorithm
create table hash_tab
(
id number ,
name varchar2(40))
partition by hash (id)
partitions 4;
Below are the partitions created in oracle after the above statement
SYS_P25
SYS_P26
SYS_P27
SYS_P28
Analyze the tables so that the num_rows column in user_tab_partitions is updated.
Insert into hash_tab values (&i,'&n');
Values inserted are
1,sdsd
45,sdfsdf
34,dfgdfg
24,dssdf
I tried to validate the algorithm logic mentioned in the above url mentioned , iam not able to derive the correct partition into which oracle inserts the records But I noticed , it starts inserting into the last partition SYS_P28
Below is the sample logic using the algorithm mentioned in the above url
num=4 --> no of partitions
v=power(2*ceil(log(2,4)));
n=f(column_value) & (v-1) --> 1 & (4-1) = 1 &3 =1
but the value 1 is getting inserted into 4th partition SYS_P28 instead of SYS_P25
Any help with the algorithm mentioned in the url is really appreciated.
This I need for training purpose