查詢高消耗CPU的pid的SQL

时间:2018-05-19 05:38:02
【文件属性】:

文件名称:查詢高消耗CPU的pid的SQL

文件大小:327B

文件格式:TXT

更新时间:2018-05-19 05:38:02

oracle sql

查詢高消耗CPU的pid的SQL,SELECT /*+ ORDERED */ sql_text FROM v$sqltext a WHERE (a.hash_value, a.address) IN ( SELECT DECODE (sql_hash_value, 0, prev_hash_value, sql_hash_value ), DECODE (sql_hash_value, 0, prev_sql_addr, sql_address) FROM v$session b WHERE b.paddr = (SELECT addr FROM v$process c WHERE c.spid = '&pid')) ORDER BY piece ASC


网友评论