Re: cache buffer chains latch

2003-12-03 Thread Jonathan Lewis

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 [EMAIL PROTECTED]
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: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).


Re: cache buffer chains latch

2003-12-03 Thread Binley Lim
Going by the original poster's use of the word suffering, there were at
least 2 unprintable bugs in 8i prior to 8.1.7.4, if the versions are
relevant in this case.

- Original Message -
To: Multiple recipients of list ORACLE-L [EMAIL PROTECTED]
Sent: Wednesday, December 03, 2003 9:39 PM



 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 [EMAIL PROTECTED]
 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: [EMAIL PROTECTED]

 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: [EMAIL PROTECTED] (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: Binley Lim
  INET: [EMAIL PROTECTED]

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: [EMAIL PROTECTED] (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).


cache buffer chains latch

2003-12-02 Thread Sultan Syed



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 
longthe latchwill 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.