查看oracle真实执行计划

一共3个step;

成都创新互联公司为您提适合企业的网站设计 让您的网站在搜索引擎具有高度排名,让您的网站具备超强的网络竞争力!结合企业自身,进行网站设计及把握,最后结合企业文化和具体宗旨等,才能创作出一份性化解决方案。从网站策划到成都网站建设、做网站, 我们的网页设计师为您提供的解决方案。

step1:在sql执行时,增加hint:  /*+gather_plan_statistics*/ 

step2:查出sql的sql id:  select * from v$sql s where s.SQL_TEXT like 'SELECT /*+monitor*/TT.*%'

step3:执行下面sql查看真实执行计划;

SELECT

 sp.last_starts AS "starts",
 
 sp.last_output_rows AS "rows",
 
 round(sp.last_elapsed_time / 1000000, 2) AS TIME,
 
 sp.last_cr_buffer_gets bf,
 
 sp.depth d,
 
 rtrim(lpad(' ', 2 * (depth - 1)) || operation ||
       decode(options, NULL, '', ' ' || options)) "Explain plan",
 
 decode(id,
        0,
        '------------- ',
        substr(decode(substr(object_name, 1, 7),
                      'SYS_LE_',
                      NULL,
                     
                      object_name) || ' ',
               1,
               30)) AS "object",
 

本文名称:查看oracle真实执行计划
浏览地址:https://www.cdcxhl.com/article4/pgehoe.html

成都网站建设公司_创新互联,为您提供企业网站制作搜索引擎优化App设计网站营销品牌网站建设网站内链

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

成都网页设计公司