30 lines
827 B
SQL
30 lines
827 B
SQL
set echo off
|
|
set term off
|
|
store set backupenv replace
|
|
set term on
|
|
|
|
set verify off
|
|
column bhr format 999.99
|
|
column mydate heading 'YYYY-MM-DD HH:MI'
|
|
set pages 10000
|
|
|
|
select
|
|
to_char(snap_time,'yyyy-mm-dd HH24:MI') mydate,
|
|
new.name buffer_pool_name,
|
|
(((new.consistent_gets-old.consistent_gets)+(new.db_block_gets-old.db_block_gets))-(new.physical_reads-old.physical_reads)) /
|
|
((new.consistent_gets-old.consistent_gets)+(new.db_block_gets-old.db_block_gets))*100 bhr
|
|
from perfstat.stats$buffer_pool_statistics old,
|
|
perfstat.stats$buffer_pool_statistics new,
|
|
perfstat.stats$snapshot sn
|
|
where snap_time > sysdate - &&1
|
|
and new.name=old.name
|
|
and new.snap_id=sn.snap_id
|
|
and old.snap_id=sn.snap_id-1
|
|
order by 1 asc
|
|
/
|
|
|
|
set echo off
|
|
set term off
|
|
start backupenv
|
|
set term on
|