Oracle Database – the user Commits/Sec Oracle metric data item represents the number of user commits performed per second during the sample period

Oracle Metric User Commits/Sec – when a user commits a transaction the redo generated that reflects the changes made to database blocks must be written to disk. Commits often represent the closest thing to a user transaction rate

col STAT_NAME for a20
col VALUE_DIFF for 9999,999,999
col STAT_PER_MIN for 9999,999,999
set lines 200 pages 1500 long 99999999
col BEGIN_INTERVAL_TIME for a30
col END_INTERVAL_TIME for a30
set pagesize 40
set pause on
 
select hsys.SNAP_ID,
       hsnap.BEGIN_INTERVAL_TIME,
       hsnap.END_INTERVAL_TIME,
           hsys.STAT_NAME,
           hsys.VALUE,
           hsys.VALUE – LAG(hsys.VALUE,1,0) OVER (ORDER BY hsys.SNAP_ID) AS „VALUE_DIFF“,
           round((hsys.VALUE – LAG(hsys.VALUE,1,0) OVER (ORDER BY hsys.SNAP_ID)) /
           round(abs(extract(hour from (hsnap.END_INTERVAL_TIME – hsnap.BEGIN_INTERVAL_TIME))*60 +
           extract(minute from (hsnap.END_INTERVAL_TIME – hsnap.BEGIN_INTERVAL_TIME)) +
           extract(second from (hsnap.END_INTERVAL_TIME – hsnap.BEGIN_INTERVAL_TIME))/60),1)) „STAT_PER_MIN“
from dba_hist_sysstat hsys, dba_hist_snapshot hsnap
 where hsys.snap_id = hsnap.snap_id
 and hsnap.instance_number in (select instance_number from v$instance)
 and hsnap.instance_number = hsys.instance_number
 and hsys.STAT_NAME=’user commits‘
 order by 1;

Leave a Reply

You must be logged in to post a comment.