Skip to Main Content

LiveLabs & Workshops

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

v$bh view inconsistent with sql trace statistics

User194454Aug 25 2021 — edited Aug 25 2021

I'd like to check if a segment has really been uploaded in the buffer pool and the only way to check it, it seems to use this query under Oracle 19c:
select o.owner,o.object_name,count(blocks) bl
from sys.dba_objects o, sys.v_$bh b
where o.object_id = b.objid
and o.owner = 'TEST'
I executed the query:
set autotrace traceonly statistics;
select * from test.dummy;
I've got the following report: 79645 consistent gets - 12457 physical reads
I executed the query again and now I've got: 79101 consistent gets - 0 physical reads
Now I queried again the v_$bh view with the owner = 'TEST' but the segment 'dummy' is not present in the view. So it appears that blocks have been read from buffer pool but the v_$bh view has not been updated in agreement with sql trace statistics.
I did the same in Postgresql 13.x using pg_buffercache extension to query shared buffers and it works fine, is it possible to do the same under Oracle 19c ?

Comments

Post Details

Added on Aug 25 2021
0 comments
242 views