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: What's the difference between pins and gets?

RE: What's the difference between pins and gets?

From: Steve Adams <steve.adams_at_ixora.com.au>
Date: Wed, 8 Nov 2000 20:08:45 +1000
Message-Id: <10674.121404@fatcity.com>


Hi Ed,

When an object has been located in (or loaded into) the library cache, the session "remembers" its location by maintaining a null mode lock on the object. When a session needs to use an object, if it already (or still) has the library cache lock, then it can proceed with the pin request. If it does not yet have a lock then a get operation is needed to get a lock before the pin can be requested.

This probably makes little sense unless you understand the distinction between the handle of a library cache object and its heaps. Locks protect the handle. Pins protect the heaps. The heaps are the "body" parts of the object that get loaded as required, except for heap 0 which contains the identifying information about the object. When we speak of an object being aged out and then reloaded, it is actually the heaps other than heap 0 of which we are speaking. Heap 0 is never aged out while any session is holding a lock on its handle.

The fundamental reason for the distinction between locks and pins is that it in theory allows an object's identity to be checked using a shared lock on the handle while another session has an exclusive pin on one or more of its heaps. The distinction is also important for maintaining cache coherence.

Hope this is not going to trigger a flood of follow-up questions ....

@   Regards,
@   Steve Adams
@   http://www.ixora.com.au/
@   http://www.christianity.net.au/


-----Original Message-----
From: Shevtsov, Eduard [mailto:EShevtsov_at_flagship.ru] Sent: Wednesday, 8 November 2000 18:38
To: 'ORACLE-L_at_fatcity.com'; 'Steve Adams' Subject: RE: What's the difference between pins and gets

Hi Steve,

how does Oracle determine that a needed object was previously located in the library cache before it would be pinned ? Does Oracle use some information in the library cache or it firstly tries to 'get' the object ?

Thanks in advance

Ed

>
>
> Hi Alex,
>
> A get is an attempt to locate an object in the library
> cache. If it is not
> found, it is loaded. Database object definitions are loaded
> from the data
> dictionary via the dictionary cache. Cursors are loaded by
> parsing the statement
> text.
>
> A pin is an attempt to use a previously located object in
> the library cache. If
> it has been aged out, then it must be reloaded.
>
> @ Regards,
> @ Steve Adams
> @ http://www.ixora.com.au/
> @ http://www.christianity.net.au/
>
>
> -----Original Message-----
> Sent: Wednesday, 8 November 2000 16:20
> To: Multiple recipients of list ORACLE-L
>
>
> Hi Listers,
>
> Could anybody please explain about what is the difference
> between gets
> and pins and correspondingly between gethits and pinhits in the
> v$librarycache view?
>
> Thank you,
> AlexP
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: AlexP
> INET: apot_at_canadawired.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).
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Steve Adams
> INET: steve.adams_at_ixora.com.au
>
> 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
Received on Wed Nov 08 2000 - 04:08:45 CST

Original text of this message

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