Oracle FAQ Your Portal to the Oracle Knowledge Grid

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

RE: freelists

From: Lex de Haan <>
Date: Fri, 5 Nov 2004 19:02:48 +0100
Message-ID: <>

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,



skype me <callto://lexdehaan>

-----Original Message-----
[]On Behalf Of Looney, Jason Sent: Friday, November 05, 2004 18:52
To: ''; Cc:; Subject: RE: freelists


  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.


-----Original Message-----
From: [] Sent: Thursday, November 04, 2004 5:24 PM To:
Cc:; 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 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,
> --

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.


Received on Fri Nov 05 2004 - 11:58:37 CST

Original text of this message