Hi guys
The following questions are confusing
me,please could someone give explanation
on the below
1)Is librarycache latch held during the
whole process of parse,execute and fetch phases ,
or it is held upto the
time searching for the object in hash table and release.
Library cache latch is held while searching for a
parent cursor and subsequent child cursor with similar attributes with parent
cursor pinned. Also library cache latch is held when creating a new
library cache object if the child cursor is not_found or
found_but_not_shareable. Since, parent cursor is pinned while searching for a
child cursor, I am not sure whether the search for child cursor needs to hold
on to the library cache latch or not. But if a new parent cursor is
to be created then the library cache latch must be
held.
Execute and Fetch uses library cache pin and library cache locks
to maintain the objects from undergoing
concurrent modification.
2)session_cached_cursor caches the child
cursor or parent cursors also.
As far as I know, session_cached_cursor is searched for pinned
child cursor. I don't know whether the parent is also kept in the
session cached cursor or not.
3)While doing hard parse which latch is acquired
,shared pool or library cache latch or both,
if it is both which latch will be acquired
first?
library cache latch is already held while requesting
for shared pool latch. Shared pool latch is acquired
to request/release space from the shared pool free memory area and
released immediately after that. Request for library cache latch can never be
made while holding the shared pool latch (at least up to 9i) as latch level
semantics will prevent that ( as shared pool latch gets are always in
willing-to-wait mode).
Thanks
in advance
Syed