set linesize 300
col wait_class format a30
set pagesize 2000
COLUMN 'TOTAL_WAIT_TIME_SECONDS' FORMAT 9999999999999999999999999999999999999999999999999999999999999999
select 'espera '||translate(WAIT_CLASS,'abcdefghijklmnopqrstuvwxyz/ ','abcdefghijklmnopqrstuvwxyz_') wait_class,
sum(TIME_WAITED_MICRO)/1000 TOTAL_WAIT_TIME_SECONDS ,
sum(TOTAL_WAITS) TOTAL_WAITS
from GV$SYSTEM_EVENT
where wait_class!='Idle'
group by WAIT_CLASS;

