[20180625]简单计算日志生成率.txt
--//执行前最好做一次日志归档.主要目的了解正常业务时redo的生成率.
--//alter syste archive log current;
SELECT thread#
,sequence#
,first_time
,next_time
,blocks * block_size / 1024 / 1024 MB
, (next_time - first_time) * 86400 sec
, blocks
* block_size
/ 1024
/ ( (next_time - first_time) * 86400)
"KB/s"
FROM v$archived_log
WHERE ( (next_time - first_time) * 86400 >= 1)
AND first_time BETWEEN TRUNC (SYSDATE) - 1 AND TRUNC (SYSDATE) + 1
AND dest_id = 1
ORDER BY first_time;
--//注:((next_time-first_time)*86400 >=1), 取消一些快速切换的情况,避免存在大的误差.
--//可以根据需要调整.