Tuesday, January 13, 2009

Script to tune cache hit ratio

REM: Date Submitted: 19-May-2006
REM: Date Posted: 30-May-2006
REM:
REM:*****************************************
REM: NOTE: PLEASE TEST THIS SCRIPT BEFORE USE.
REM: Author will not be responsible for any damage that may be cause by this script.
REM:*****************************************


DECLARE
ROWCACHE NUMBER(10,2);
BEGIN
Select ((sum(getmisses) / sum(gets))*100) INTO ROWCACHE From v$rowcache;
IF ROWCACHE<15 then
dbms_output.put_line(\'TUNING THE CACHE HIT RATIO IS less than 15% This value is ok \'||rowcache ||\'%\');
end if;
IF ROWCACHE>15 then
dbms_output.put_line(\'increase the initialisation parameter SHARED_POOL_SIZE \'||rowcache);
end if;
END;
/

No comments:

Post a Comment