您好,登錄后才能下訂單哦!
一共3個step;
step1:在sql執(zhí)行時,增加hint: /*+gather_plan_statistics*/
step2:查出sql的sql id: select * from v$sql s where s.SQL_TEXT like 'SELECT /*+monitor*/TT.*%'
step3:執(zhí)行下面sql查看真實(shí)執(zhí)行計(jì)劃;
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",
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報,并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。