Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: freelists

RE: freelists

From: Lex de Haan <lex.de.haan_at_naturaljoin.nl>
Date: Fri, 5 Nov 2004 19:02:48 +0100
Message-ID: <JFEEIGBIDOCCDALDIPLNGEILCKAA.lex.de.haan@naturaljoin.nl>


Hi Jason,
if you ask for five partitions, all five will be used. the algorithm will be based on eight partitions -- the next power of 2 -- and buckets 6-7-8 will be mapped to buckets 2-3-4 respectively. additions/corrections welcome,

Lex.  



visit http://www.naturaljoin.nl

skype me <callto://lexdehaan>

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org]On Behalf Of Looney, Jason Sent: Friday, November 05, 2004 18:52
To: 'Graeme.Farmer_at_mincom.com'; alavihamid_at_gmail.com Cc: oracle-l_at_freelists.org; oracle-l-bounce_at_freelists.org Subject: RE: freelists

Graeme,  

  From what I understand in regards to Oracle's Hash algorithm, the number of possible outcomes from the Hash should be on a 2^n system. So, the possibilities are 1, 2, 4, 8, 16, 32, 64, 128, etc. For example, if you have a hash partitioned table and set the number of partitions to 5, the fifth one will not be used. The same is true with Freelists. Oracle does a hash to determine which one you get, but if you have 5 freelists the fifth one will not be used, but 1-4 will be fairly evenly distributed. This usually isn't a huge deal because when one freelist is exhausted, it allocates more to that particular freelist, not to all of them. So, the 5 freelist will always have the initial amount in it.

Jason.

-----Original Message-----
From: Graeme.Farmer_at_mincom.com [mailto:Graeme.Farmer_at_mincom.com] Sent: Thursday, November 04, 2004 5:24 PM To: alavihamid_at_gmail.com
Cc: oracle-l_at_freelists.org; oracle-l-bounce_at_freelists.org Subject: Re: freelists

When freelists is greater than 1, sessions are allocated to segment/process freelists based on a hash function and hash functions generally give more even spread (avoid collisions) when the hash table size is a prime number.
The hash function in this case is based on the session id of the connecting user. (mod(SID,FREELISTS)+1).

eg SID=10, FREELISTS=3, HASH = mod(10,3)+1 = 1+1 = 2

Oracle appears to allocate SIDs by choosing the "Least Recently Used" SID or allocating them sequentially if there are no "second hand" SIDs so to speak. I don't believe this combination of allocation mechanism along with the hashing function would be particularly susceptible to collisions, however it is usually safer to stick to prime numbers for most hash tables.

Of course, your need for configuring freelists in the first place should be well justified and evidenced.

Graeme

oracle-l-bounce_at_freelists.org wrote on 04/11/2004 03:23:11 AM:

> List,
>
> I have read that freelist must be a n even number like 1,2,3,5,7 etc
> my question is what happen if you define freelist = 4, some thing
> wrong or what?
> any idea?
>
> Thanks,
> --
> http://www.freelists.org/webpage/oracle-l

-- 
This transmission is for the intended addressee only and is confidential
information. If you have received this transmission in error, please notify
the sender and delete the transmission. The contents of this e-mail are the
opinion of the writer only and are not endorsed by the Mincom Group of
companies unless expressly stated otherwise.



--
http://www.freelists.org/webpage/oracle-l
--
http://www.freelists.org/webpage/oracle-l



--
http://www.freelists.org/webpage/oracle-l
Received on Fri Nov 05 2004 - 11:58:37 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US