lib.sql

SELECT SUM(pins) "Executions", SUM(reloads) "Cache Misses while Executing", substr(SUM(reloads)*100/SUM(pins),1,4) Ratio
  FROM v$librarycache;

--Reducing Data Dictionary Cache Misses
--
--        Examine cache activity by monitoring the sums of the GETS and GETMISSES columns. 
--        For frequently accessed dictionary caches, the ratio of total GETMISSES 
--        to total GETS should be less than 10% or 15%. If the ratio continues 
--        to increase above this threshold while your application is running, 
--        you should consider increasing the amount of memory available 
--        to the data dictionary cache. To increase the memory available to the cache, 
--        increase the value of the initialization parameter SHARED_POOL_SIZE.        
        
SELECT SUM(gets), SUM(getmisses), substr(SUM(getmisses)*100/SUM(gets),1,4) Ratio
  FROM v$rowcache;