2026-03-12 20:23:15
This commit is contained in:
29
vg/sp_buffer_hit_ratio_trend.sql
Normal file
29
vg/sp_buffer_hit_ratio_trend.sql
Normal file
@@ -0,0 +1,29 @@
|
||||
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
|
||||
Reference in New Issue
Block a user