加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Oracle 11g 比10046更直观的工具DBMS_SQLTUNE

发布时间:2020-12-12 14:22:19 所属栏目:百科 来源:网络整理
导读:比起10046,它的优势是 图像化界面更加友好, 可以看到每一步占用的CPU,IO的等待时间及大小,特别是并行的执行计划10046会生成太多的文件,不好分析,它只生成一个。 The real-time SQL monitoring feature of Oracle Database enables you to monitor the p
比起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 注意:要想分析生成的文件必须得连上网络。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读