db_cache hitratio sql and v$db_cache_advice and create table with storage

tolilong發表於2012-06-02
select
(select value from v$sysstat where name='physical reads') phy ,
(select value from v$sysstat where name='db block gets') get,
(select value from v$sysstat where name='consistent gets') con_get,
(1-((select value from v$sysstat where name='physical reads')/
((select value from v$sysstat where name='db block gets')+(select value from v$sysstat where name='consistent gets')))) hit
from dual


select * from v$db_cache_advice



create table with storage parameter(buffer pool)
create table test(id number(4),name varchar2(50)) storage(buffer_pool keep/recycle)


_db_percent_hot_default (50)      The percent of buffers in the hot region
_db_aging_touch_time (3)            Seconds that must pass to increment touch count again
_db_aging_hot_criteria (2)            Threshold to move a buffer to the MRU end of LRU chain
_db_aging_stay_count (0)             Touch count reset to this when moved to MRU end
_db_aging_cool_count (1)             Touch count reset to this when moved to LRU end


獲取隱藏引數sql:
  SELECT x.ksppinm NAME, y.ksppstvl VALUE, x.ksppdesc describ
   FROM SYS.x$ksppi x, SYS.x$ksppcv y
   WHERE x.inst_id = USERENV ('Instance')
   AND y.inst_id = USERENV ('Instance')
   AND x.indx = y.indx
   AND x.ksppinm LIKE '%&par%';

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/24237320/viewspace-731706/,如需轉載,請註明出處,否則將追究法律責任。

相關文章