Archivelogs
SELECT
MAX("CNT") AS "MAX_ARCLGS_PERHR",
SUM("CNT") "SUM_ARCLGS",COUNT(*) "HRS" ,
TRUNC(sum("CNT")/COUNT(*)) AS "AVG_ARCLGS_PERHR90DYS" ,
TRUNC ( MAX("CNT") / ( (TRUNC(sum("CNT")/COUNT(*)) ) * 5 ) ) AS "POSSIBLE_AVG"
FROM ( SELECT count(*) as CNT,to_char(completion_time,'yyyy.mm.dd hh24')
FROM v$archived_log
WHERE completion_time > sysdate - 90
GROUP BY to_char(completion_time,'yyyy.mm.dd hh24')
);
Komentarze
Prześlij komentarz