buffer cache holds objects not listed in dba_objects [message #64664] |
Thu, 18 December 2003 18:54 |
Thilo Planz
Messages: 3 Registered: December 2003
|
Junior Member |
|
|
Hi all,
I am trying to get an overview of the contents of my Oracle 9i buffer cache. I am using queries against v$bh as found all over the Internet. I saw that only objects accounting for about 3% of the cache size show up. Running the modified query below (which also lists buffers associated to an objd that is not found in dba_objects) shows me that a lot of space in buffers that have an objd in v$bh which does not map to any object in dba_objects:
Number Percentage
Object of of Data
Owner Name Buffers Buffer
--------------- ------------------------------ -------- ------------
77,579 97
... below my valid objects
What does this mean?
Thanks,
Thilo
Query:
column c0 heading 'Owner' format a15
column c1 heading 'Object|Name' format a30
column c2 heading 'Number|of|Buffers' format 999,999
column c3 heading 'Percentage|of Data|Buffer' format 999,999,999
select
owner c0,
object_name c1,
count(1) c2,
(count(1)/(select count(*) from v$bh)) *100 c3
from
dba_objects o right outer join
v$bh bh on
o.object_id = bh.objd
group by
owner,
object_name
order by
3 desc
|
|
|
Re: buffer cache holds objects not listed in dba_objects [message #64666 is a reply to message #64664] |
Thu, 18 December 2003 21:14 |
Frank Naude
Messages: 4587 Registered: April 1998
|
Senior Member |
|
|
Hi,
You also need to consider the block's status. For example: some of the blocks (not related to objects) might be free, being read-in from disk, etc. Look at this slightly modified query:
SQL> select owner c0, object_name c1, bh.status c4, count(1) c2,
2 (count(1)/(select count(*) from v$bh)) *100 c3
3 from dba_objects o right outer join v$bh bh on o.object_id = bh.objd
4 group by owner, object_name, bh.status
5 order by 3 desc
6 /
...
Number Percentage
Object Block of of Data
Owner Name Statu Buffers Buffer
--------------- ------------------------------ ----- -------- ------------
SYS VIEW$ scur 17 0
SYS VTABLE$ scur 3 0
scur 3,476 3
read 1 0
free 83,381 66
...
Best regards.
Frank
|
|
|
Re: buffer cache holds objects not listed in dba_objects [message #64667 is a reply to message #64666] |
Thu, 18 December 2003 21:59 |
Thilo Planz
Messages: 3 Registered: December 2003
|
Junior Member |
|
|
Thanks Frank,
your improved query shows me that 96% of my buffer cache is used by exclusively locked blocks without a proper object associated to them.
What kind of data can this be? Should not every buffer belong to some dba_object? Also note that these buffers do have V$BH.objd, it is just that these objd do not resolve in dba_objects.
Thilo
Number Percentage
Object of of Data
Owner Name C4 Buffers Buffer
--------------- ------------------------------ ----- -------- ------------
xcur 77,067 96
read 20 0
cr 318 0
|
|
|
|
|
|