Oracle 开发篇+追踪PL/SQL执行情况(层次分析器)
发布日期:2021-06-29 12:02:36
浏览次数:3
分类:技术文章
本文共 1495 字,大约阅读时间需要 4 分钟。
说明:本文为面向PL/SQL开发初学者的指导手册 标签:dbms_hprof、层次分析器、查看执行情况、Tracing PL/SQL Execution 优点:该方法适合分析PL/SQL每个环节的用时详情 易学:文中删去了不需要的多余部分,让初学者一目了然一学就会 温馨提示:如果您发现本文哪里写的有问题或者有更好的写法请留言或私信我进行修改优化
--用途
分析PL/SQL每个环节的用时详情--授权+准备
grant dba to scott; create directory d as '/home/oracle/'; grant read,write on directory d to scott; grant execute on dbms_hprof to scott;--切换用户
conn scott/tiger--启动分析(大小写敏感)
--将分析输出到D目录下的指定文件中 exec dbms_hprof.start_profiling('D','s.txt');--删除存储过程
drop procedure p1; --创建存储过程 create or replace procedure p1 is begin update scott.emp set sal=sal+1; commit; end; /--停止分析
exec dbms_hprof.stop_profiling;--创建analyze表
@?/rdbms/admin/dbmshptab.sql--转换输出
begin dbms_output.put_line(dbms_hprof.analyze('D','s.txt')); end; /--查看输出(方法1)(html格式)
[oracle@main ~]$ $ORACLE_HOME/bin/plshprof -output scott_hprof s.txt PLSHPROF: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production [14 symbols processed] [Report written to 'scott_hprof.html'][oracle@main ~]$ ls scott_hprof*
scott_hprof_2c.html scott_hprof.html scott_hprof_nsc.html scott_hprof_tc.html scott_hprof_2f.html scott_hprof_md.html scott_hprof_nsf.html scott_hprof_td.html scott_hprof_2n.html scott_hprof_mf.html scott_hprof_nsp.html scott_hprof_tf.html scott_hprof_fn.html scott_hprof_ms.html scott_hprof_pc.html scott_hprof_ts.html --查看输出(方法2)(数据库表格式) select * from scott.dbmshp_runs; select * from scott.dbmshp_function_info; select * from scott.dbmshp_parent_child_info;
※ 如果您觉得文章写的还不错, 别忘了在文末给作者点个赞哦 ~
over
转载地址:https://blog.csdn.net/zzt_2009/article/details/114239877 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
不错!
[***.144.177.141]2024年04月20日 13时22分43秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
猿来绘Java-39-JDK8的新日期时间类
2019-04-29
猿来绘Java-40-比较器(Comparable 接口与 CompareTo方法)
2019-04-29
猿来绘Java-41-源码分析String对象的数组的排序(JDK1.8)
2019-04-29
猿来绘Java-42-枚举类的使用
2019-04-29
猿来绘Java-43-初步认识注解
2019-04-29
猿来绘Java-44-自定义注解和元注解
2019-04-29
猿来绘Java-45-JDK8新特性可重复注解和类型注解
2019-04-29
猿来绘Java-46-Collection接口及其方法
2019-04-29
猿来绘Java-47- foreatch 增强for循环
2019-04-29
2021/4/27课堂总结和作业
2019-04-29
2021.4.28课堂总结和作业
2019-04-29
2021.4.29课堂总结
2019-04-29
2021.4.30课堂总结和作业
2019-04-29
需要吗?2000GB+学习视频教程 面试资料免费下载
2019-04-29
MySQL对已存在数据库表添加自增ID字段
2019-04-29
idea中的一些常用快捷键
2019-04-29
js校验表单后提交表单的三种方法总结【转载】
2019-04-29
欢迎使用CSDN-markdown编辑器
2019-04-29
a标签中href调用js的几种方法
2019-04-29