oracle 耗资源比较大的SQL
时间:
select sql_id,sid,serial#,username,target,sql_plan_operation,sofar blocks_read,totalwork total_blocks,round(time_remaining/60) minutes from v$session_longops sofar : Units of work done so far for the operation specified in the OPNAME column Totalwork:Total units of work for the operation specified in the OPNAME column Time_remaining:Estimate (in seconds) of time remaining for the operation to complete V$SESSION_LONGOPS displays the status of various operations that run for longer than 6 seconds (in absolute time). These operations currently include many backup and recovery functions,statistics gathering,and query execution,and more operations are added for every Oracle release. 官方文档并未对v$session_longops原理做详细的介绍,想要通过v$session_longops监控一个操作,需要满足以下条件: 1 执行操作超过6秒 IO select sql_id,disk_reads from --- 具体要依据什么信息排序可适当选择,而此视图里的多项值是累积的 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |