-none- 2005-02-06 - By -not available-
SQL > select kqfdtequ from x$kqfdt where kqfdtnam = 'X$KGLCURSOR ';
KQFDTEQU
-- ---- ---- ---- ---- ---- --
X$KGLOB <--- this means that x$kglcursor actually uses the same memory
structure as x$kglob (but can shows different elements/columns of it)
The next query shows us the physical memory offsets X$ table columns
representing elements in fixed arrays:
SQL > select t.kqftanam, c.kqfconam, c.kqfcotab, c.kqfcotyp, c.kqfcosiz,
c.kqfcolof
2 from x$kqfta t, x$kqfco c
3 where t.indx = c.kqfcotab
4 and c.kqfconam in ( 'KSUSEAPP ', 'KGLOBTS0 ');
KQFTANAM KQFCONAM KQFCOTAB KQFCOTYP KQFCOSIZ KQFCOLOF
-- ---- -- -- ---- -- -- ---- -- -- ---- -- -- ---- -- -- ---- --
X$KSUSE KSUSEAPP 23 3 48 3740
X$KGLOB KGLOBTS0 352 3 64 1300
KQFCOTYP = 3 shows that these columns are raw string type, not a pointer to
anywhere, thus they are stored within given memory structures (kglob for
library cache objects), not somewhere else. Just to check:
SQL > select addr, kglobts0 from x$kglob where kglobts0 is not null and
rownum < 5;
ADDR KGLOBTS0
-- ----- -- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---
05CFB2A8 sqlplus.exe
0566B90C sqlplus.exe
05CFB2A8 sqlplus.exe
0566B90C sqlplus.exe
Also, as you see from following queries, the session and library cache
elements are allocated from totally different memory regions, so there is no
sharing of common information (derived tables can reference to data
structures in shared manner, but only to different columns within the same
data structure (as I understand))..
SQL > select min(addr), max(addr) from x$ksuse;
MIN(ADDR MAX(ADDR
-- ----- -- -----
6A77A9B0 6A7FA690
SQL > select min(addr), max(addr) from x$kglob;
MIN(ADDR MAX(ADDR
-- ----- -- -----
05660AAC 05CFB2A8
This is actually perfectly reasonable, because if there was a common memory
location for MODULE and ACTION for both sessions and library cache, then
what should happen to module and action values in cached cursors when
session sets a new module/action and parses a new query? The old
module/action values must not change, thus have to be stored independently
in different locations, for each child cursor separately.
Now this overhead is much more important than the session array effect I
thought of at first :)
Tanel.
--
http://www.freelists.org/webpage/oracle-l
|
|