Home » Other » General » [ask] ora hash in partitioning table by hash (oracle 10g)




Re: [ask] ora hash in partitioning table by hash [message #463408 is a reply to message #463403] 
Thu, 01 July 2010 04:12 
ekopur
Messages: 9 Registered: June 2010 Location: indonesia

Junior Member 


michel, i read some artikel in asktom.oracle.com ( http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:981835183841#692992200346988718 )
Quote:
Consider, these 4 variables (part_col, no_of_part, bucket_size, prev_2_power)
part_col be candidate partitioning column
no_of_part is the number of partitions we are considering
bucket_size is derived from no_of_part as follows:
if no_of_part is powers of 2(2,4,8,16...) then
bucket_size = no_of_part  1
else if no_of_part not powers of 2 then
bucket_size = "next higher power of 2"  1
for eg, if you have 24 no_of_part then (32 1) = 31
prev_2_power is no_of_part if its a power of 2 number else its previous power of 2. for ex. for 24 partitions, 16 would be prev_2_power
THEN
Partition Number =
case
ora_hash(part_col, bucket_size)+ 1 > no_of_part
then
ora_hash(part_col, bucket_size)+ 1  prev_2_power
else
ora_hash(part_col, bucket_size)+ 1 /* +1 since bucket start with 0 but partitions start with 1 */
end;
is that true algorithm??
regards
pur
[Updated on: Thu, 01 July 2010 04:21] by Moderator Report message to a moderator




Goto Forum:
Current Time: Tue Jul 07 23:40:13 CDT 2015
Total time taken to generate the page: 0.12601 seconds
