一共3個step;
成都創(chuàng)新互聯(lián)公司為您提適合企業(yè)的網(wǎng)站設(shè)計?讓您的網(wǎng)站在搜索引擎具有高度排名,讓您的網(wǎng)站具備超強的網(wǎng)絡(luò)競爭力!結(jié)合企業(yè)自身,進行網(wǎng)站設(shè)計及把握,最后結(jié)合企業(yè)文化和具體宗旨等,才能創(chuàng)作出一份性化解決方案。從網(wǎng)站策劃到成都網(wǎng)站建設(shè)、做網(wǎng)站, 我們的網(wǎng)頁設(shè)計師為您提供的解決方案。
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查看真實執(zhí)行計劃;
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",