给你一个脚本,lz真懒啊,脚本导出都是
--diskread
SELECT *
FROM (SELECT a.inst_id,
b.sid,
b.username,
b.event,
b.osuser,
a.parsing_schema_name,
a.SQL_ID,
a.LAST_ACTIVE_TIME,
a.DISK_READS,a.DIRECT_WRITES,
a.BUFFER_GETS,a.EXECUTIONS,
a.elapsed_time/1000000,
a.disk_reads
/ DECODE (a.executions, 0, 1, a.executions) rds_exec_ratio,
a.sql_text STATEMENT,
b.last_call_et
FROM gv$sql a,gv$session b
where a.sql_id = b.sql_id
and a.inst_id = b.inst_id
--and b.username = 'IASYS'
and b.status = 'ACTIVE'
ORDER BY rds_exec_ratio DESC)
WHERE ROWNUM < 50
ORDER BY rds_exec_ratio DESC ;
|