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: cache buffer chains latch

Re: cache buffer chains latch

From: Sultan Syed <ssyed_at_fine.ae>
Date: Wed, 03 Dec 2003 03:34:24 -0800
Message-ID: <F001.005D8891.20031203033424@fatcity.com>


Thankyou Jonathan for your reply.

So if I use for example DEPT,EMP tables, assume dept in one hash chain and emp in another hash chain; if my statement is something like this
select e.* from emp e where e.deptno =(select d.deptno from dept d where d.deptno=10);
 1 step

-process will go to dept hash chain and
-acquire the latch
-read the block
-bring the result

2 step
-process will go to emp hash chain and
-acquire the latch
-read the block
-bring the result

Here the latch release will happen two times by the same process? 1 st from dept chain and 2nd from emp chain?

Thanks

>
> My current understanding is:
> a) For normal buffer gets,
> the latch is acquired,
> the chain is scanned
> the buffer is pinned
> the latch is released
> the buffer is used
> --
> the latch is acquired
> the pin is dropped
> (although the pin may be held
> for the duration of the SQL or pl/sql
> call if Oracle expects to revisit the buffer)
>
> b) Consistent gets - examination
> the latch is acquired
> the chain is scanned
> if the buffer can be found it read
> the latch is dropped
>
> Iin case (b), Oracle can make use of a
> shared read latch - where the underlying
> CPU supports it.
>
> But I may be wrong - especially about (b),
> and I haven't identified all the cases where
> an examination is legal.
>
>
> Question 2 - the best answers come from Steve Adams.
> But in summary, think library cache latch children - you
> may need to validate several objects in the library cache
> at once, and they could be covered by different child latches.
>
> Latches have a level#, from 0 to 9, and there is a precedence
> of latch acquisition across levels that is designed to stop latch
> acquisition deadlocks (again see S.A.).
>
> The holding of multiple latches also explains the presence of
> the column named (something like) waits_holding in v$latch.
> You have waited for this latch whilst holding another latch.
>
>
> Regards
>
> Jonathan Lewis
> http://www.jlcomp.demon.co.uk
>
> The educated person is not the person
> who can answer the questions, but the
> person who can question the answers -- T. Schick Jr
>
>
> One-day tutorials:
> http://www.jlcomp.demon.co.uk/tutorial.html
>
>
> Three-day seminar:
> see http://www.jlcomp.demon.co.uk/seminar.html
> ____UK___November
>
>
> The Co-operative Oracle Users' FAQ
> http://www.jlcomp.demon.co.uk/faq/ind_faq.html
>
>
> ----- Original Message -----
> To: "Multiple recipients of list ORACLE-L" <ORACLE-L_at_fatcity.com>
> Sent: Wednesday, December 03, 2003 4:19 AM
>
>
> Hi All,
>
> My system is suffering in cache buffer chain,I found the reason.
> My general questions is
> 1)
> When the process holding the latch how long the latch will be held ,until
> the hase chain is read or
> the process goes to the particular block and return the rows(output) ?
>
> 2)
> When the situation will occur for the process to hold two
latches(different
> or same) simultaneously ?
>
> Please reply.
>
> Syed.
>
>
>
>
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Jonathan Lewis
> INET: jonathan_at_jlcomp.demon.co.uk
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> 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.net
-- 
Author: Sultan Syed
  INET: ssyed_at_fine.ae

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 Dec 03 2003 - 05:34:24 CST

Original text of this message

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