-- =======================================================================
-- 	Verifica as querys que consumiram CPU.
-- =======================================================================
set linesize 2000
set buffer 2000
set pagesize 20
-- 
select
   substr(to_char(s.pct, '99.00'), 2) || '%'  load,
   p.address,
   s.executions  executes,
   p.sql_text
from (select address, 
             disk_reads, 
             executions, 
             pct, 
             rank() over (order by disk_reads desc)  ranking
             from (select address, 
                          disk_reads, 
                          executions, 100 * ratio_to_report(disk_reads) over ()  pct
     	                  from sys.v_$sql
  	                  where command_type != 47  )
             where disk_reads > 50 * executions )  s, sys.v_$sqltext p
             where s.ranking <= 70 and p.address = s.address
order by 1, s.address, p.piece
/

hostgator