Oracle 11g 比10046更直观的工具DBMS_SQLTUNE
来源:互联网 发布:php供求发布系统源码 编辑:程序博客网 时间:2024/05/17 07:28
比起10046,它的优势是图像化界面更加友好,可以看到每一步占用的CPU,IO的等待时间及大小,特别是并行的执行计划10046会生成太多的文件,不好分析,它只生成一个。
The real-time SQL monitoring feature of Oracle Database enables you to monitor the performance of SQL statements while they are executing. By default, SQL monitoring automatically starts when a SQL statement runs parallel, or when it has consumed at least 5 seconds of CPU or I/O time in a single execution.
SQL以并行方式或者单独运行占用CPU或IO的时间超过5秒钟就会自动被ORACLE启用监视。
如果没有权限执行DBMS_SQLTUNE,则需要赋予用户ADVISOR权限
grant ADVISOR to test;
要想看report,需要查询是否在gv$sql_monitor中是否存在。
select * from gv$sql_monitor s where s.SQL_ID='3m43vtkhgh83u';
set pages 0 echo off timing off linesize 1000 trimspool on trim on long 2000000 feedback off
spool d:/453hh5f98kzqw.html
SELECT DBMS_SQLTUNE.report_sql_monitor(
type=> 'active',
sql_id=> '453hh5f98kzqw',
sql_exec_id=>null,
report_level=> 'ALL'
) monitor_report FROM dual;
SPOOL OFF
注意:要想分析生成的文件必须得连上网络。
The real-time SQL monitoring feature of Oracle Database enables you to monitor the performance of SQL statements while they are executing. By default, SQL monitoring automatically starts when a SQL statement runs parallel, or when it has consumed at least 5 seconds of CPU or I/O time in a single execution.
SQL以并行方式或者单独运行占用CPU或IO的时间超过5秒钟就会自动被ORACLE启用监视。
如果没有权限执行DBMS_SQLTUNE,则需要赋予用户ADVISOR权限
grant ADVISOR to test;
要想看report,需要查询是否在gv$sql_monitor中是否存在。
select * from gv$sql_monitor s where s.SQL_ID='3m43vtkhgh83u';
set pages 0 echo off timing off linesize 1000 trimspool on trim on long 2000000 feedback off
spool d:/453hh5f98kzqw.html
SELECT DBMS_SQLTUNE.report_sql_monitor(
type=> 'active',
sql_id=> '453hh5f98kzqw',
sql_exec_id=>null,
report_level=> 'ALL'
) monitor_report FROM dual;
SPOOL OFF
注意:要想分析生成的文件必须得连上网络。
阅读全文
0 0
- Oracle 11g 比10046更直观的工具DBMS_SQLTUNE
- ORACLE dbms_sqltune
- ORACLE的DBMS_SQLTUNE调优某个SQL
- Oracle 11g新增not null的字段比10g快--新特性
- 代码加约束VFL语法的详细使用介绍(代替Autolayout进行布局,比Autolayout更简单明了,生动直观)
- 缺陷管理:全员的质量意识比工具更重要!
- 缺陷管理:全员的质量意识比工具更重要!
- HouseMD, 比BTrace更实用的Java运行诊断工具
- dozer比beanUtills更健壮的对象转换工具
- 比SharedPrefereces更强大的缓存工具类
- 没有比这更完整的sdcard工具类了
- casperjs(一),比phantomjs更有戏的爬虫工具
- oracle导出dmp文件时,ORA-00904: "POLTYP": 标识符无效,是因为用的11g的exp工具而被导出的数据库是10g的,版本比它高
- dbms_sqltune包的使用
- 介绍一下gnu global,比cscope更方便更快速的索引工具
- 超直观的可视化机器学习工具
- Oracle 11g不使用sqlplusw工具
- Oracle 11g ADRCI工具使用
- 回调函数的作用及实现机制-附例子
- hdfs常用的Shell操作
- 常用第三方框架-Masonry(ios)和SnapKit(swift)
- RMI连接失败问题
- 激活函数
- Oracle 11g 比10046更直观的工具DBMS_SQLTUNE
- git中merge和rebase的区别
- weak 属性需要在dealloc中置为nil吗
- 面试时“自我介绍”应聘者如何巧妙回答
- Glide4.0+使用的坑
- 使用模板类实现KM算法
- @synthesize 和 @dynamic 分别表示什么
- 被CSDN删除的32万阅读量的文章--CTreeCtrl 控件使用总结
- Objective-C 内存管理机制