Script to Check Total No. of Blocks in Buffer Cache for each User Object

COLUMN object_name FORMAT A40

COLUMN number_of_blocks FORMAT 999,999,999,999

SELECT o.object_name, COUNT(*) number_of_blocks

FROM DBA_OBJECTS o, V$BH bh

WHERE o.data_object_id = bh.OBJD

AND o.owner != ‘SYS’

GROUP BY o.object_Name

ORDER BY COUNT(*);

Leave a Reply