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: hash_value and address

Re: hash_value and address

From: Stephane Faroult <sfaroult_at_oriole.com>
Date: Wed, 04 Sep 2002 12:59:34 -0800
Message-ID: <F001.004C7C1D.20020904125934@fatcity.com>


Pablo Rodriguez wrote:
>
> I see 2 different addreses for the same hash_value in
> v$sqlarea.
> Why do I see this?
>
> Here's an example:
>
> hash_value address
> ---------- -------
> 3749804 4064082C
> 3749804 4192941C
>
> I wonder if someone can shed some light on this
>
> Txs
>

My understanding is that to quickly find an already parsed statement in memory, Oracle uses a hash function, which, like all hash functions is not surjective (which means that you can have x <>y and f(x)= f(y), in which case you say you have a collision). Of course once the hash value has been computed values are checked, and all strings hashing to the same value are linked - and stored at different addresses. You can also have the case in which statements are strictly identical, but, for session-related reasons, cannot be considered the same cursor (because of synonyms pointing to different objects, of similarly named tables in different schemas, or because optimizer settings have been altered at the session level, typically). In that case it's normal to have the same hash result for the same string - but you nevertheless have a collision of a sort.

-- 
HTH,

Stephane Faroult
Oriole Software
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriole.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Wed Sep 04 2002 - 15:59:34 CDT

Original text of this message

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