sga.sql

SELECT (sum(pins - reloads)) / sum(pins) "Lib Cache"
        FROM v$librarycache;

        SELECT (sum(gets - getmisses - usage - fixed)) / sum(gets) "Row Cache" 
        FROM v$rowcache;

        The amount of free memory in the shared pool is reported in V$SGASTAT. 
        The instantaneous value can be reported using the query 

        SELECT * 
        FROM v$sgastat
        WHERE name = 'free memory';

--       If there is always free memory available within the shared pool, 
--       then increasing the size of the pool will have little or no beneficial effect. 
--        However, just because the shared pool is full does not necessarily mean 
--        that there is a problem. If the ratios discussed above are close to 1, 
--        there is no need to increase the pool size.