2 Star 0 Fork 0

mirrors_ReneNyffenegger/ashmasters

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
ash_top_procedure.sql 1.99 KB
一键复制 编辑 原始数据 按行查看 历史
/*
only 10.2.0.3 and above
COUNT(*) SQL_ID calling_code
--------- ------------- --------------------------------------------------------------------
2 1xxksrhwtz3zf ORDERENTRY.NEWORDER => DBMS_RANDOM.VALUE
2 07p193phmhx3z ORDERENTRY.BROWSEPRODUCTS => DBMS_APPLICATION_INFO.SET_ACTION
2 1xxksrhwtz3zf ORDERENTRY.NEWORDER => DBMS_LOCK.SLEEP
3 1xxksrhwtz3zf ORDERENTRY.NEWORDER => DBMS_APPLICATION_INFO.SET_ACTION
13 1xxksrhwtz3zf ORDERENTRY.NEWORDER
16 0bzhqhhj9mpaa ORDERENTRY.NEWCUSTOMER
45 41zu158rqf4kf ORDERENTRY.BROWSEANDUPDATEORDERS
70 0yas01u2p9ch4 ORDERENTRY.NEWORDER
76 dw2zgaapax1sg ORDERENTRY.NEWORDER
82 05s4vdwsf5802 ORDERENTRY.BROWSEANDUPDATEORDERS
111 75621g9y3xmvd ORDERENTRY.NEWORDER
120 75621g9y3xmvd ORDERENTRY.BROWSEPRODUCTS
131 75621g9y3xmvd ORDERENTRY.BROWSEANDUPDATEORDERS
163 0uuqgjq7k12nf ORDERENTRY.NEWORDER
*/
set linesize 120
col entry_package for a25
col entry_procedure for a25
col cur_package for a25
col cur_procedure for a25
col calling_code for a70
select
count(*),
sql_id,
procs1.object_name || decode(procs1.procedure_name,'','','.')||
procs1.procedure_name ||' '||
decode(procs2.object_name,procs1.object_name,'',
decode(procs2.object_name,'','',' => '||procs2.object_name))
||
decode(procs2.procedure_name,procs1.procedure_name,'',
decode(procs2.procedure_name,'','',null,'','.')||procs2.procedure_name)
"calling_code"
from v$active_session_history ash,
all_procedures procs1,
all_procedures procs2
where
ash.PLSQL_ENTRY_OBJECT_ID = procs1.object_id (+)
and ash.PLSQL_ENTRY_SUBPROGRAM_ID = procs1.SUBPROGRAM_ID (+)
and ash.PLSQL_OBJECT_ID = procs2.object_id (+)
and ash.PLSQL_SUBPROGRAM_ID = procs2.SUBPROGRAM_ID (+)
and ash.sample_time > sysdate - &minutes/(60*24)
group by procs1.object_name, procs1.procedure_name,
procs2.object_name, procs2.procedure_name,sql_id
order by count(*)
/
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors_ReneNyffenegger/ashmasters.git
git@gitee.com:mirrors_ReneNyffenegger/ashmasters.git
mirrors_ReneNyffenegger
ashmasters
ashmasters
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385