查看甲骨文真实执行计划

一共3个步骤;

步骤1:在sql执行时,增加提示:,/* + gather_plan_statistics */,

步骤2:查出sql的sql id:,select * from v $ sql的年代。SQL_TEXT像“选择/* +监控*/TT。* % '

步骤3:执行下面sql查看真实执行计划,

,选择sp。last_starts为“开始”,
,
, sp。last_output_rows为“行”,
,
, (sp。last_elapsed_time/1000000, 2)随着时间,
,
, sp。last_cr_buffer_gets bf,
,
, sp.depth d
,
,空白(lpad(“2 *(深度- 1))| |操作| |
,,,,,,解码(选项、空”,“| |选项)“解释计划”,
,
,解码(id,
,,,,,,,0,
,,,,,,,“- - - - - - - - - - - - -”,
,,,,,,,substr(解码(substr (object_name 1 7),
,,,,,,,,,,,,,,,,,,,,,“SYS_LE_”,
,,,,,,,,,,,,,,,,,,,,,空,
,,,,,,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,,,,,,,object_name) | |”,
,,,,,,,,,,,,,,1,
,,,,,,,,,,,,,,30))作为“对象”,
,



查看甲骨文真实执行计划