檢視資料庫啟動以來回滾率

leon830216發表於2014-03-01
select
    a.value commits,
    b.value rollbacks,
    to_char(b.value * 100/ (a.value + b.value), '90.99') || '%' rollbacks_rate
from
(
    select name, value
    from v$sysstat where name = 'user commits'
) a
,
(
    select name, value from v$sysstat
    where name = 'transaction rollbacks'
) b
/

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

相關文章