sql执行计划变了

今天数据库做了如下调整,修改了两个节点的local_listener参数
alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.244.132)(PORT=1521))))' scope=both sid='orcl2'
alter system set local_listener='(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=10.1.244.131)(PORT=1521))))' scope=both sid='orcl1'

今天上午8:30分,节点一的cpu达到100%,发现下面的Sql的执行计划出现问题。

sql语句:
select *
from (select content0_.CONTENT_ID as CONTENT1_30_0_,
coontentblo1_.BLOB_ID as BLOB1_31_1_,
content0_.FOLDER_ID as FOLDER 2_30_0_,
content0_.TEMPLATE_ID as TEMPLATE3_30_0_,
content0_.CONTENT_PATH as CONTENT4_30_0_,
content0_.CONTENT_PATH_CODE as CONTEN T5_30_0_,
content0_.CONTENT_ORDER as CONTENT6_30_0_,
content0_.CONTENT_TITLE as CONTENT7_30_0_,
content0_.CONTENT_AUTHOR as CONTEN T8_30_0_,
content0_.CONTENT_WRITE_DATE as CONTENT9_30_0_,
content0_.CONTENT_TIMER_STATUS as CONTENT10_30_0_,
content0_.CONTENT_TIMER as CONTENT11_30_0_,
content0_.CONTENT_KEYWORDS as CONTENT12_30 0,
content0_.CONTENT_SOURCE as CONTENT13_30_0_,
content0_.CONTENT_SUMMARY as CONTENT14_30_0_,
content0_.CONTENT_STATE as CONTENT 15_30_0_,
content0_.CREATER as CREATER30_0_,
content0_.CREATION_DATE as CREATION17_30_0_,
content0_.MENDER as MENDER30_0_,
content0_.MODIFIED_DATE as MODIFIED19_30_0_,
content0_.CONTENT_VERIFY as CONTENT20_30_0_,
content0_.CONTENT_EXPIRE as CONTENT21_30_0_,
content0_.ORDER_DATE as ORDER22_30_0_,
content0_.ORDER_NUMBER as OR DER23_30_0_,
content0_.CONTENT_TYPE as CONTENT24_30_0_,
content0_ .UPDATE_DATE as UPDATE25_30_0_,
content0_.START_DATE as START26_3 0_0_,
content0_.OPENTYPE as OPENTYPE30_0_,
content0_.STATICURL as STATICURL30_0_,
content0_.AFFIX as AFFIX30_0_,
content0_.IMP_CONTENT_ID as IMP30_30_0_,
content0_.SCORE_TYPE_ID as SCORE31_30_0_,
content0_.COMMENT_TYPE_ID as COMMENT32_30_0_,
content0_.PARENT_CONTENT_ID as PARENT33_30_0_,
content0_.COMMENT_TYPE as COMMENT34_ 30_0_,
content0_.SCHEDULE_TIME as SCHEDULE35_30_0_,
content0_.ICO N_TIME as ICON36_30_0_,
content0_.CONTENT_TIME as CONTENT37_30_0_,
content0_.MESSAGE_FLAG as MESSAGE38_30_0_,
content0_.RELATED as RELATED30_0_,
content0_.RELATED_CONTENT_ID as RELATED40_30_0_,
content0_.CONTENT_HYPERLINK as CONTENT41_30_0_,
contentblo1_.CONTENT_PROPERTY as CONTENT2_31_1_,
contentblo1_.SECURITY_POLICY as SE CURITY3_31_1_,
contentblo1_.SUBSCRIPTION_POLICY as SUBSCRIP4_31_1 _
from VEGA_WCM_CONTENT_MAIN content0_,
VEGA_WCM_CONTENT_BLOB contentblo1_
where content0_.CONTENT_ID = contentblo1_.BLOB_ID
and content0_.CONTENT_STATE = :1
and content0_.CONTENT_PATH_CODE = :2
and (content0_.CREATER = 'guest' or exists
(select viewpolicy2_.POLICY_ID
from VEGA_WCM_VIEW_POLICY viewpolicy2_
where content0_.CONTENT_ID = viewpolicy2_.CONTENT_ID
and (viewpolicy2_.POLICY_TYPE || viewpolicy2_.POLICY_NAME in
('com.coolwen.core.security.impl.UserPrincipalImplguest', 'com.coolwen.core.security.impl.UserPrincipalImplgu
est'))))
order by content0_.CONTENT_ORDER DESC,
content0_.ORDER_DATE DESC,
content0_.ORDER_NUMBER DESC)
where rownum <= :3

当前执行计划:
这个sql在8:30分的时候,使用的一直都是错误的执行计划。
错误的执行计划:
Execution Plan


IdOperationNameRowsBytesTempSpcCost (%CPU)Time


0SELECT STATEMENT    13605 (100) 
1COUNT STOPKEY      
2VIEW 102813M 13605 (1)00:02:44
3SORT ORDER BY STOPKEY 1028717K12M13605 (1)00:02:44
4FILTER      
5HASH JOIN 1788012M7568K10908 (1)00:02:11
6TABLE ACCESS FULLVEGA_WCM_CONTENT_MAIN178807351K 1681 (1)00:00:21
7TABLE ACCESS FULLVEGA_WCM_CONTENT_BLOB101K28M 7383 (1)00:01:29
8TABLE ACCESS BY INDEX ROWIDVEGA_WCM_VIEW_POLICY189 4 (0)00:00:01
9INDEX RANGE SCANPOLICY_CONTENT_ID1  3 (0)00:00:01



以前的执行计划:
Execution Plan

IdOperationNameRowsBytesCost (%CPU)Time


0SELECT STATEMENT   30 (100) 
1COUNT STOPKEY     
2VIEW 11371330 (4)00:00:01
3SORT ORDER BY STOPKEY 171530 (4)00:00:01
4FILTER     
5NESTED LOOPS 11786529 (0)00:00:01
6TABLE ACCESS BY INDEX ROWIDVEGA_WCM_CONTENT_MAIN1146317 (0)00:00:01
7INDEX RANGE SCANCONTENT_PATH_CODE12 3 (0)00:00:01
8TABLE ACCESS BY INDEX ROWIDVEGA_WCM_CONTENT_BLOB12942 (0)00:00:01
9INDEX UNIQUE SCANSYS_C0072921 1 (0)00:00:01
10TABLE ACCESS BY INDEX ROWIDVEGA_WCM_VIEW_POLICY1894 (0)00:00:01
11INDEX RANGE SCANPOLICY_CONTENT_ID1 3 (0)00:00:01


出现两种执行计划,推断原因,可能首次给传给绑定变量不理想的值,导致出现了全表扫描的执行计划。

请帮助查找原因

Liu Maclean(刘相兵)

Posts: 685
Registered: 08/21/12
Re: sql执行计划变化了
Posted: 2012-10-23 下午8:40   in response to: user13303995 in response to: user13303995
 
Click to report abuse... Click to reply to this threadReply
执行以下脚本 并给出 输出

set lines 150 pages 150
col BEGIN_INTERVAL_TIME for a23
col PLAN_HASH_VALUE for 9999999999
col date_time for a30
col snap_id heading 'SnapId'
col executions_delta heading "No. of exec"
col sql_profile heading "SQL|Profile" for a7
col date_time heading 'Date time'
 
col avg_lio heading 'LIO/exec' for 99999999999.99
col avg_cputime heading 'CPUTIM/exec' for 9999999.99
col avg_etime heading 'ETIME/exec' for 9999999.99
col avg_pio heading 'PIO/exec' for 9999999.99
col avg_row heading 'ROWs/exec' for 9999999.99
SELECT distinct
s.snap_id ,
PLAN_HASH_VALUE,
to_char(s.BEGIN_INTERVAL_TIME,'mm/dd/yy_hh24mi')|| to_char(s.END_INTERVAL_TIME,'_hh24mi') Date_Time,
SQL.executions_delta,
SQL.buffer_gets_delta/decode(nvl(SQL.executions_delta,0),0,1,SQL.executions_delta) avg_lio,
--SQL.ccwait_delta,
(SQL.cpu_time_delta/1000000)/decode(nvl(SQL.executions_delta,0),0,1,SQL.executions_delta) avg_cputime ,
(SQL.elapsed_time_delta/1000000)/decode(nvl(SQL.executions_delta,0),0,1,SQL.executions_delta) avg_etime,
SQL.DISK_READS_DELTA/decode(nvl(SQL.executions_delta,0),0,1,SQL.executions_delta) avg_pio,
SQL.rows_processed_total/decode(nvl(SQL.executions_delta,0),0,1,SQL.executions_delta) avg_row
--,SQL.sql_profile
FROM
dba_hist_sqlstat SQL,
dba_hist_snapshot s
WHERE
SQL.instance_number =(select instance_number from v$instance)
and SQL.dbid =(select dbid from v$database)
and s.snap_id = SQL.snap_id
AND sql_id in
('&SQLID') order by s.snap_id
/ 
 
 
 
 
 
select plan_table_output from table (dbms_xplan.display_awr('&sql_id',null,null,
'ADVANCED +PEEKED_BINDS'));

请把 结果发给我 :

有问题请去OTN中文论坛开个帖子 我会回复 地址:http://www.otncn.org
如果需要发送附件,可以直接发邮件到 liu.maclean@gmail.com

user13303995

Posts: 3
Registered: 10/24/12
Re: sql执行计划变化了
Posted: 2012-10-24 上午1:28   in response to: user13303995 in response to: user13303995
 
Click to report abuse... Click to reply to this threadReply
SQL> set lines 150 pages 150
SQL> col BEGIN_INTERVAL_TIME for a23
col PLAN_HASH_VALUE for 9999999999
col date_time for a30
col snap_id heading 'SnapId'
col executions_delta heading "No. of exec"
col sql_profile heading "SQL|Profile" for a7
col date_time heading 'Date time'

col avg_lio heading 'LIO/exec' for 99999999999.99
col avg_cputime heading 'CPUTIM/exec' for 9999999.99
col avg_etime heading 'ETIME/exec' for 9999999.99
col avg_pio heading 'PIO/exec' for 9999999.99
col avg_row heading 'ROWs/exec' for 9999999.99
SELECT distinct
s.snap_id ,
PLAN_HASH_VALUE,
to_char(s.BEGIN_INTERVAL_TIME,'mm/dd/yy_hh24mi')|| to_char(s.END_INTERVAL_TIME,'_hh24mi') Date_Time,
SQL.executions_delta,
SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> SQL> 2 3 4 5 6 SQL.buffer_gets_delta/decode(nvl(SQL.executions_delta,0),0,1,SQL.executions_delta) avg_lio,
--SQL.ccwait_delta,
(SQL.cpu_time_delta/1000000)/decode(nvl(SQL.executions_delta,0),0,1,SQL.executions_delta) avg_cputime ,
(SQL.elapsed_time_delta/1000000)/decode(nvl(SQL.executions_delta,0),0,1,SQL.executions_delta) avg_etime,
SQL.DISK_READS_DELTA/decode(nvl(SQL.executions_delta,0),0,1,SQL.executions_delta) avg_pio,
SQL.rows_processed_total/decode(nvl(SQL.executions_delta,0),0,1,SQL.executions_delta) avg_row
--,SQL.sql_profile
FROM
dba_hist_sqlstat SQL,
dba_hist_snapshot s
WHERE
SQL.instance_number =(select instance_number from v$instance)
7 8 9 10 11 12 13 14 15 16 17 18 and SQL.dbid =(select dbid from v$database)
and s.snap_id = SQL.snap_id
AND sql_id in
('&SQLID') order by s.snap_id
/ 19 20 21 22
Enter value for sqlid: c9j9xmsyk285f
old 21: ('&SQLID') order by s.snap_id
new 21: ('c9j9xmsyk285f') order by s.snap_id

SnapId PLAN_HASH_VALUE Date time No. of exec LIO/exec CPUTIM/exec ETIME/exec PIO/exec ROWs/exec


---------------
-----------
-----------
-----------
2998 1735989731 10/22/12_1055_1106 2882 4436.37 .02 .07 4.21 4.02
2998 1735989731 10/22/12_1056_1106 2882 4436.37 .02 .07 4.21 4.02
2999 1735989731 10/22/12_1106_1200 28237 4092.60 .02 .02 .01 4.30
3000 1735989731 10/22/12_1200_1300 10527 4366.18 .02 .02 .00 15.45
3001 1735989731 10/22/12_1300_1400 15588 4315.38 .02 .02 .00 14.42
3002 1735989731 10/22/12_1400_1500 27352 4149.61 .02 .02 .00 12.12
3003 1735989731 10/22/12_1500_1600 31273 4097.11 .02 .02 .00 14.48
3004 1735989731 10/22/12_1600_1700 30543 4200.65 .02 .02 .00 18.73
3005 1735989731 10/22/12_1700_1800 19631 4245.20 .02 .02 .00 33.02
3006 1735989731 10/22/12_1800_1900 5018 3947.27 .02 .02 .00 133.11
3007 1735989731 10/22/12_1900_2000 1670 4006.21 .02 .02 .00 403.81
3008 1735989731 10/22/12_2000_2100 1383 3773.94 .02 .02 .00 491.45
3009 1735989731 10/22/12_2100_2200 599 3575.35 .02 .02 .00 1138.24
3010 1735989731 10/22/12_2200_2300 245 3518.97 .02 .02 .00 2786.41
3011 1735989731 10/22/12_2300_0000 144 5136.55 .03 .03 .00 4744.87
3012 1735989731 10/23/12_0000_0100 113 5240.58 .03 .03 .00 6050.29
3013 1735989731 10/23/12_0100_0200 16 5951.44 .03 .03 .00 42734.06
3014 1735989731 10/23/12_0200_0300 9 3499.56 .02 .02 .00 75975.00
3016 1735989731 10/23/12_0400_0500 28 5528.75 .03 .03 .00 24424.89
3017 1735989731 10/23/12_0500_0600 80 4345.21 .02 .02 .00 8553.13
3018 1735989731 10/23/12_0600_0700 116 5443.16 .03 .03 .00 5902.67
3019 1735989731 10/23/12_0700_0800 3119 4374.43 .02 .02 .00 223.59
3020 1735989731 10/23/12_0800_0900 29607 4325.05 .02 .02 .00 27.54
3021 1735989731 10/23/12_0900_1000 30528 4088.49 .02 .02 .00 30.63
3022 1735989731 10/23/12_1000_1100 27015 4113.25 .02 .02 .00 38.53
3023 1735989731 10/23/12_1100_1200 21823 3921.04 .02 .02 .00 51.52
3024 1735989731 10/23/12_1200_1300 7953 3962.80 .02 .02 .00 145.29
3025 1735989731 10/23/12_1300_1400 11798 4395.17 .02 .02 .00 101.96
3026 1735989731 10/23/12_1400_1500 21540 4000.75 .02 .02 .00 59.77
3027 1735989731 10/23/12_1500_1600 26116 4068.01 .02 .02 .00 53.21
3028 1735989731 10/23/12_1600_1700 26207 4036.69 .02 .02 .00 56.92
3029 1735989731 10/23/12_1700_1800 16828 3921.38 .02 .02 .00 92.53
3030 1735989731 10/23/12_1800_1900 4148 4205.10 .02 .02 .00 379.34
3031 1735989731 10/23/12_1900_2000 1394 3682.31 .02 .02 .00 1132.56
3032 1735989731 10/23/12_2000_2100 1167 3714.90 .02 .02 .00 1356.71
3033 1735989731 10/23/12_2100_2200 823 3802.68 .02 .02 .00 1927.79
3034 1735989731 10/23/12_2200_2300 437 3781.26 .02 .02 .00 3634.49
3035 1735989731 10/23/12_2300_0000 206 3398.09 .02 .02 .00 7713.52
3036 1735989731 10/24/12_0000_0100 39 493.05 .00 .00 .00 40746.31
3037 1735989731 10/24/12_0100_0200 3 184.67 .00 .00 .00 529703.00
3038 1735989731 10/24/12_0200_0300 16 4076.00 .02 .02 .00 99323.81
3042 1735989731 10/24/12_0600_0700 81 5789.57 .03 .03 .00 19623.70
3043 1735989731 10/24/12_0700_0800 2933 4534.83 .02 .02 .00 546.05
3043 4092041270 10/24/12_0700_0800 2 58185.00 .63 .64 .00 3.50
3044 1735989731 10/24/12_0800_0900 26725 4050.48 .02 .02 .00 63.93
3044 4092041270 10/24/12_0800_0900 348 50988.38 .60 .60 .00 3.30
3045 1735989731 10/24/12_0900_1000 29273 3894.18 .02 .02 .00 62.31
3045 4092041270 10/24/12_0900_1000 312 54031.28 .62 .63 .00 7.03
3046 1735989731 10/24/12_1000_1100 22151 3948.75 .02 .02 .00 86.30
3046 4092041270 10/24/12_1000_1100 326 50777.56 .60 .60 .00 10.00
3047 1735989731 10/24/12_1100_1200 19028 3725.89 .02 .02 .00 104.35
3047 4092041270 10/24/12_1100_1200 223 49660.25 .59 .60 .00 17.58
3048 1735989731 10/24/12_1200_1300 7356 3929.10 .02 .02 .00 273.86
3048 4092041270 10/24/12_1200_1300 63 50734.89 .59 .60 .00 65.49
3049 1735989731 10/24/12_1300_1400 10514 4303.99 .02 .02 .00 195.63
3049 4092041270 10/24/12_1300_1400 77 50928.57 .59 .60 .00 56.77
3050 1735989731 10/24/12_1400_1500 18127 3858.04 .02 .02 .00 117.38
3050 4092041270 10/24/12_1400_1500 226 50668.62 .60 .60 .00 22.72
3051 1735989731 10/24/12_1500_1600 21730 3681.27 .02 .02 .00 101.79
3051 4092041270 10/24/12_1500_1600 282 52321.21 .61 .61 .00 21.46

60 rows selected.

SQL> select plan_table_output from table (dbms_xplan.display_awr('&sql_id',null,null,'ADVANCED +PEEKED_BINDS'));
Enter value for sql_id: c9j9xmsyk285f
old 1: select plan_table_output from table (dbms_xplan.display_awr('&sql_id',null,null,'ADVANCED +PEEKED_BINDS'))
new 1: select plan_table_output from table (dbms_xplan.display_awr('c9j9xmsyk285f',null,null,'ADVANCED +PEEKED_BINDS'))

PLAN_TABLE_OUTPUT

SQL_ID c9j9xmsyk285f

select * from ( select content0_.CONTENT_ID as CONTENT1_30_0_,
contentblo1_.BLOB_ID as BLOB1_31_1_, content0_.FOLDER_ID as
FOLDER2_30_0_, content0_.TEMPLATE_ID as TEMPLATE3_30_0_,
content0_.CONTENT_PATH as CONTENT4_30_0_, content0_.CONTENT_PATH_CODE
as CONTENT5_30_0_, content0_.CONTENT_ORDER as CONTENT6_30_0_,
content0_.CONTENT_TITLE as CONTENT7_30_0_, content0_.CONTENT_AUTHOR as
CONTENT8_30_0_, content0_.CONTENT_WRITE_DATE as CONTENT9_30_0_,
content0_.CONTENT_TIMER_STATUS as CONTENT10_30_0_,
content0_.CONTENT_TIMER as CONTENT11_30_0_, content0_.CONTENT_KEYWORDS
as CONTENT12_30_0_, content0_.CONTENT_SOURCE as CONTENT13_30_0_,
content0_.CONTENT_SUMMARY as CONTENT14_30_0_, content0_.CONTENT_STATE
as CONTENT15_30_0_, content0_.CREATER as CREATER30_0_,
content0_.CREATION_DATE as CREATION17_30_0_, content0_.MENDER as
MENDER30_0_, content0_.MODIFIED_DATE as MODIFIED19_30_0_,
content0_.CONTENT_VERIFY as CONTENT20_30_0_, content0_.CONTENT_EXPIRE
as CONTENT21_30_0_, content0_.ORDER_DATE as ORDER22_30_0_,
content0_.ORDER_NUMBER as ORDER23_30_0_, content0_.CONTENT_TYPE as
CONTENT24_30_0_, content0_.UPDATE_DATE as UPDATE25_30_0_,
content0_.START_DATE as START26_30_0_, content0_.OPENTYPE as
OPENTYPE30_0_, content0_.STATICURL as STATICURL30_0_, content0_.AFFIX
as AFFIX30_0_, content0_.IMP_CONTENT_ID as IMP30_30_0_,
content0_.SCORE_TYPE_ID as SCORE31_30_0_, content0_.COMMENT_TYPE_ID as
COMMENT32_30_0_, content0_.PARENT_CONTENT_ID as PARENT33_30_0_,
content0_.COMMENT_TYPE as COMMENT34_30_0_, content0_.SCHEDULE_TIME as
SCHEDULE35_30_0_, content0_.ICON_TIME as ICON36_30_0_,
content0_.CONTENT_TIME as CONTENT37_30_0_, content0_.MESSAGE_FLAG as
MESSAGE38_30_0_, content0_.RELATED as RELATED30_0_,
content0_.RELATED_CONTENT_ID as RELATED40_30_0_,
content0_.CONTENT_HYPERLINK as CONTENT41_30_0_,
contentblo1_.CONTENT_PROPERTY as CONTENT2_31_1_,
contentblo1_.SECURITY_POLICY as SECURITY3_31_1_,
contentblo1_.SUBSCRIPTION_POLICY as SUBSCRIP4_31_1_ from
VEGA_WCM_CONTENT_MAIN content0_, VEGA_WCM_CONTENT_BLOB contentblo1_
where content0_.CONTENT_ID=contentblo1_.BLOB_ID and
content0_.CONTENT_STATE=:1 and content0_.CONTENT_PATH_CODE=:2 and
(content0_.CREATER='guest' or exists (select viewpolicy2_.POLICY_ID
from VEGA_WCM_VIEW_POLICY viewpolicy2_ where
content0_.CONTENT_ID=viewpolicy2_.CONTENT_ID and
(viewpolicy2_.POLICY_TYPE||viewpolicy2_.POLICY_NAME in
('com.coolwen.core.security.impl.UserPrincipalImplguest' ,
'com.coolwen.core.security.impl.UserPrincipalImplguest')))) order by
content0_.CONTENT_ORDER DESC, content0_.ORDER_DATE DESC,
content0_.ORDER_NUMBER DESC ) where rownum <= :3

Plan hash value: 1735989731


IdOperationNameRowsBytesCost (%CPU)Time


0SELECT STATEMENT   30 (100) 
1COUNT STOPKEY     
2VIEW 11371330 (4)00:00:01
3SORT ORDER BY STOPKEY 171530 (4)00:00:01
4FILTER     
5NESTED LOOPS 11786529 (0)00:00:01
6TABLE ACCESS BY INDEX ROWIDVEGA_WCM_CONTENT_MAIN1146317 (0)00:00:01
7INDEX RANGE SCANCONTENT_PATH_CODE12 3 (0)00:00:01
8TABLE ACCESS BY INDEX ROWIDVEGA_WCM_CONTENT_BLOB12942 (0)00:00:01
9INDEX UNIQUE SCANSYS_C0072921 1 (0)00:00:01
10TABLE ACCESS BY INDEX ROWIDVEGA_WCM_VIEW_POLICY1894 (0)00:00:01
11INDEX RANGE SCANPOLICY_CONTENT_ID1 3 (0)00:00:01



Query Block Name / Object Alias (identified by operation id):


1 - SEL$1
2 - SEL$2 / from$_subquery$_001@SEL$1
3 - SEL$2
6 - SEL$2 / CONTENT0_@SEL$2
7 - SEL$2 / CONTENT0_@SEL$2
8 - SEL$2 / CONTENTBLO1_@SEL$2
9 - SEL$2 / CONTENTBLO1_@SEL$2
10 - SEL$3 / VIEWPOLICY2_@SEL$3
11 - SEL$3 / VIEWPOLICY2_@SEL$3

Outline Data


/*+
BEGIN_OUTLINE_DATA
IGNORE_OPTIM_EMBEDDED_HINTS
OPTIMIZER_FEATURES_ENABLE('11.2.0.2')
DB_VERSION('11.2.0.2')
ALL_ROWS
OUTLINE_LEAF(@"SEL$3")
OUTLINE_LEAF(@"SEL$2")
OUTLINE_LEAF(@"SEL$1")
NO_ACCESS(@"SEL$1" "from$_subquery$_001"@"SEL$1")
INDEX_RS_ASC(@"SEL$2" "CONTENT0_"@"SEL$2" ("VEGA_WCM_CONTENT_MAIN"."CONTENT_PATH_CODE"))
INDEX_RS_ASC(@"SEL$2" "CONTENTBLO1_"@"SEL$2" ("VEGA_WCM_CONTENT_BLOB"."BLOB_ID"))
LEADING(@"SEL$2" "CONTENT0_"@"SEL$2" "CONTENTBLO1_"@"SEL$2")
USE_NL(@"SEL$2" "CONTENTBLO1_"@"SEL$2")
INDEX_RS_ASC(@"SEL$3" "VIEWPOLICY2_"@"SEL$3" ("VEGA_WCM_VIEW_POLICY"."CONTENT_ID"))
END_OUTLINE_DATA
*/

Peeked Binds (identified by position):


1 - :1 (NUMBER): 3
2 - :2 (VARCHAR2(30), CSID=873): '/zong/zh/wpt6xglw/o7npo2m5/be51d66w'
3 - :3 (NUMBER): 5

Note

- cardinality feedback used for this statement

SQL_ID c9j9xmsyk285f

select * from ( select content0_.CONTENT_ID as CONTENT1_30_0_,
contentblo1_.BLOB_ID as BLOB1_31_1_, content0_.FOLDER_ID as
FOLDER2_30_0_, content0_.TEMPLATE_ID as TEMPLATE3_30_0_,
content0_.CONTENT_PATH as CONTENT4_30_0_, content0_.CONTENT_PATH_CODE
as CONTENT5_30_0_, content0_.CONTENT_ORDER as CONTENT6_30_0_,
content0_.CONTENT_TITLE as CONTENT7_30_0_, content0_.CONTENT_AUTHOR as
CONTENT8_30_0_, content0_.CONTENT_WRITE_DATE as CONTENT9_30_0_,
content0_.CONTENT_TIMER_STATUS as CONTENT10_30_0_,
content0_.CONTENT_TIMER as CONTENT11_30_0_, content0_.CONTENT_KEYWORDS
as CONTENT12_30_0_, content0_.CONTENT_SOURCE as CONTENT13_30_0_,
content0_.CONTENT_SUMMARY as CONTENT14_30_0_, content0_.CONTENT_STATE
as CONTENT15_30_0_, content0_.CREATER as CREATER30_0_,
content0_.CREATION_DATE as CREATION17_30_0_, content0_.MENDER as
MENDER30_0_, content0_.MODIFIED_DATE as MODIFIED19_30_0_,
content0_.CONTENT_VERIFY as CONTENT20_30_0_, content0_.CONTENT_EXPIRE
as CONTENT21_30_0_, content0_.ORDER_DATE as ORDER22_30_0_,
content0_.ORDER_NUMBER as ORDER23_30_0_, content0_.CONTENT_TYPE as
CONTENT24_30_0_, content0_.UPDATE_DATE as UPDATE25_30_0_,
content0_.START_DATE as START26_30_0_, content0_.OPENTYPE as
OPENTYPE30_0_, content0_.STATICURL as STATICURL30_0_, content0_.AFFIX
as AFFIX30_0_, content0_.IMP_CONTENT_ID as IMP30_30_0_,
content0_.SCORE_TYPE_ID as SCORE31_30_0_, content0_.COMMENT_TYPE_ID as
COMMENT32_30_0_, content0_.PARENT_CONTENT_ID as PARENT33_30_0_,
content0_.COMMENT_TYPE as COMMENT34_30_0_, content0_.SCHEDULE_TIME as
SCHEDULE35_30_0_, content0_.ICON_TIME as ICON36_30_0_,
content0_.CONTENT_TIME as CONTENT37_30_0_, content0_.MESSAGE_FLAG as
MESSAGE38_30_0_, content0_.RELATED as RELATED30_0_,
content0_.RELATED_CONTENT_ID as RELATED40_30_0_,
content0_.CONTENT_HYPERLINK as CONTENT41_30_0_,
contentblo1_.CONTENT_PROPERTY as CONTENT2_31_1_,
contentblo1_.SECURITY_POLICY as SECURITY3_31_1_,
contentblo1_.SUBSCRIPTION_POLICY as SUBSCRIP4_31_1_ from
VEGA_WCM_CONTENT_MAIN content0_, VEGA_WCM_CONTENT_BLOB contentblo1_
where content0_.CONTENT_ID=contentblo1_.BLOB_ID and
content0_.CONTENT_STATE=:1 and content0_.CONTENT_PATH_CODE=:2 and

PLAN_TABLE_OUTPUT

(content0_.CREATER='guest' or exists (select viewpolicy2_.POLICY_ID
from VEGA_WCM_VIEW_POLICY viewpolicy2_ where
content0_.CONTENT_ID=viewpolicy2_.CONTENT_ID and
(viewpolicy2_.POLICY_TYPE||viewpolicy2_.POLICY_NAME in
('com.coolwen.core.security.impl.UserPrincipalImplguest' ,
'com.coolwen.core.security.impl.UserPrincipalImplguest')))) order by
content0_.CONTENT_ORDER DESC, content0_.ORDER_DATE DESC,
content0_.ORDER_NUMBER DESC ) where rownum <= :3

Plan hash value: 4092041270


IdOperationNameRowsBytesTempSpcCost (%CPU)Time


0SELECT STATEMENT    13605 (100) 
1COUNT STOPKEY      
2VIEW 102813M 13605 (1)00:02:44
3SORT ORDER BY STOPKEY 1028717K12M13605 (1)00:02:44
4FILTER      
5HASH JOIN 1788012M7568K10908 (1)00:02:11
6TABLE ACCESS FULLVEGA_WCM_CONTENT_MAIN178807351K 1681 (1)00:00:21
7TABLE ACCESS FULLVEGA_WCM_CONTENT_BLOB101K28M 7383 (1)00:01:29
8TABLE ACCESS BY INDEX ROWIDVEGA_WCM_VIEW_POLICY189 4 (0)00:00:01
9INDEX RANGE SCANPOLICY_CONTENT_ID1  3 (0)00:00:01



Query Block Name / Object Alias (identified by operation id):


1 - SEL$1
2 - SEL$2 / from$_subquery$_001@SEL$1
3 - SEL$2
6 - SEL$2 / CONTENT0_@SEL$2
7 - SEL$2 / CONTENTBLO1_@SEL$2
8 - SEL$3 / VIEWPOLICY2_@SEL$3
9 - SEL$3 / VIEWPOLICY2_@SEL$3

Outline Data


/*+
BEGIN_OUTLINE_DATA
IGNORE_OPTIM_EMBEDDED_HINTS
OPTIMIZER_FEATURES_ENABLE('11.2.0.2')
DB_VERSION('11.2.0.2')
ALL_ROWS
OUTLINE_LEAF(@"SEL$3")
OUTLINE_LEAF(@"SEL$2")
OUTLINE_LEAF(@"SEL$1")
NO_ACCESS(@"SEL$1" "from$_subquery$_001"@"SEL$1")
FULL(@"SEL$2" "CONTENT0_"@"SEL$2")
FULL(@"SEL$2" "CONTENTBLO1_"@"SEL$2")
LEADING(@"SEL$2" "CONTENT0_"@"SEL$2" "CONTENTBLO1_"@"SEL$2")
USE_HASH(@"SEL$2" "CONTENTBLO1_"@"SEL$2")
INDEX_RS_ASC(@"SEL$3" "VIEWPOLICY2_"@"SEL$3" ("VEGA_WCM_VIEW_POLICY"."CONTENT_ID"))
END_OUTLINE_DATA
*/

Peeked Binds (identified by position):


1 - :1 (NUMBER): 3
2 - :2 (VARCHAR2(30), CSID=873): '/guizhoufgs/zh/4ezxm9j6/ktt03p29/pbqtb4tt/zw0ixoxa'
3 - :3 (NUMBER): 1

Note

- cardinality feedback used for this statement

216 rows selected.

SQL>

Liu Maclean(刘相兵)

Posts: 685
Registered: 08/21/12
Re: sql执行计划变化了
Posted: 2012-10-24 上午5:32   in response to: user13303995 in response to: user13303995
 
Click to report abuse... Click to reply to this threadReply
贴代码 要么 用code 模式 ,要么直接发给我邮箱 , 你贴的格式太难看了
user13303995

Posts: 3
Registered: 10/24/12
Re: sql执行计划变化了
Posted: 2012-10-24 下午6:07   in response to: Liu Maclean(刘相兵) in response to: Liu Maclean(刘相兵)
 
Click to report abuse... Click to reply to this threadReply
哦 怎么搞code模式啊
Liu Maclean(刘相兵)

Posts: 685
Registered: 08/21/12
Re: sql执行计划变化了
Posted: 2012-10-25 上午12:09   in response to: user13303995 in response to: user13303995
 
Click to report abuse... Click to reply to this threadReply
==========================================================================================================
 
SQL> select plan_table_output from table (dbms_xplan.display_awr('&sql_id',null,null,'ADVANCED +PEEKED_BINDS'));
Enter value for sql_id: c9j9xmsyk285f
old   1: select plan_table_output from table (dbms_xplan.display_awr('&sql_id',null,null,'ADVANCED +PEEKED_BINDS'))
new   1: select plan_table_output from table (dbms_xplan.display_awr('c9j9xmsyk285f',null,null,'ADVANCED +PEEKED_BINDS'))
 
PLAN_TABLE_OUTPUT                                                                                                                                     
------------------------------------------------------------------------------------------------------------------------------------------------------
SQL_ID c9j9xmsyk285f                                                                                                                                  
--------------------                                                                                                                                  
select * from ( select content0_.CONTENT_ID as CONTENT1_30_0_,                                                                                        
contentblo1_.BLOB_ID as BLOB1_31_1_, content0_.FOLDER_ID as                                                                                           
FOLDER2_30_0_, content0_.TEMPLATE_ID as TEMPLATE3_30_0_,                                                                                              
content0_.CONTENT_PATH as CONTENT4_30_0_, content0_.CONTENT_PATH_CODE                                                                                 
as CONTENT5_30_0_, content0_.CONTENT_ORDER as CONTENT6_30_0_,                                                                                         
content0_.CONTENT_TITLE as CONTENT7_30_0_, content0_.CONTENT_AUTHOR as                                                                                
CONTENT8_30_0_, content0_.CONTENT_WRITE_DATE as CONTENT9_30_0_,                                                                                       
content0_.CONTENT_TIMER_STATUS as CONTENT10_30_0_,                                                                                                    
content0_.CONTENT_TIMER as CONTENT11_30_0_, content0_.CONTENT_KEYWORDS                                                                                
as CONTENT12_30_0_, content0_.CONTENT_SOURCE as CONTENT13_30_0_,                                                                                      
content0_.CONTENT_SUMMARY as CONTENT14_30_0_, content0_.CONTENT_STATE                                                                                 
as CONTENT15_30_0_, content0_.CREATER as CREATER30_0_,                                                                                                
content0_.CREATION_DATE as CREATION17_30_0_, content0_.MENDER as                                                                                      
MENDER30_0_, content0_.MODIFIED_DATE as MODIFIED19_30_0_,                                                                                             
content0_.CONTENT_VERIFY as CONTENT20_30_0_, content0_.CONTENT_EXPIRE                                                                                 
as CONTENT21_30_0_, content0_.ORDER_DATE as ORDER22_30_0_,                                                                                            
content0_.ORDER_NUMBER as ORDER23_30_0_, content0_.CONTENT_TYPE as                                                                                    
CONTENT24_30_0_, content0_.UPDATE_DATE as UPDATE25_30_0_,                                                                                             
content0_.START_DATE as START26_30_0_, content0_.OPENTYPE as                                                                                          
OPENTYPE30_0_, content0_.STATICURL as STATICURL30_0_, content0_.AFFIX                                                                                 
as AFFIX30_0_, content0_.IMP_CONTENT_ID as IMP30_30_0_,                                                                                               
content0_.SCORE_TYPE_ID as SCORE31_30_0_, content0_.COMMENT_TYPE_ID as                                                                                
COMMENT32_30_0_, content0_.PARENT_CONTENT_ID as PARENT33_30_0_,                                                                                       
content0_.COMMENT_TYPE as COMMENT34_30_0_, content0_.SCHEDULE_TIME as                                                                                 
SCHEDULE35_30_0_, content0_.ICON_TIME as ICON36_30_0_,                                                                                                
content0_.CONTENT_TIME as CONTENT37_30_0_, content0_.MESSAGE_FLAG as                                                                                  
MESSAGE38_30_0_, content0_.RELATED as RELATED30_0_,                                                                                                   
content0_.RELATED_CONTENT_ID as RELATED40_30_0_,                                                                                                      
content0_.CONTENT_HYPERLINK as CONTENT41_30_0_,                                                                                                       
contentblo1_.CONTENT_PROPERTY as CONTENT2_31_1_,                                                                                                      
contentblo1_.SECURITY_POLICY as SECURITY3_31_1_,                                                                                                      
contentblo1_.SUBSCRIPTION_POLICY as SUBSCRIP4_31_1_ from                                                                                              
VEGA_WCM_CONTENT_MAIN content0_, VEGA_WCM_CONTENT_BLOB contentblo1_                                                                                   
where content0_.CONTENT_ID=contentblo1_.BLOB_ID and                                                                                                   
content0_.CONTENT_STATE=:1 and content0_.CONTENT_PATH_CODE=:2 and                                                                                     
(content0_.CREATER='guest' or exists (select viewpolicy2_.POLICY_ID                                                                                   
from VEGA_WCM_VIEW_POLICY viewpolicy2_ where                                                                                                          
content0_.CONTENT_ID=viewpolicy2_.CONTENT_ID and                                                                                                      
(viewpolicy2_.POLICY_TYPE||viewpolicy2_.POLICY_NAME in                                                                                                
('com.coolwen.core.security.impl.UserPrincipalImplguest' ,                                                                                            
'com.coolwen.core.security.impl.UserPrincipalImplguest')))) order by                                                                                  
content0_.CONTENT_ORDER DESC, content0_.ORDER_DATE DESC,                                                                                              
content0_.ORDER_NUMBER DESC ) where rownum <= :3                                                                                                      
                                                                                                                                                      
Plan hash value: 1735989731                                                                                                                           
                                                                                                                                                      
----------------------------------------------------------------------------------------------------------                                            
| Id  | Operation                        | Name                  | Rows  | Bytes | Cost (%CPU)| Time     |                                            
----------------------------------------------------------------------------------------------------------                                            
|   0 | SELECT STATEMENT                 |                       |       |       |    30 (100)|          |                                            
|   1 |  COUNT STOPKEY                   |                       |       |       |            |          |                                            
|   2 |   VIEW                           |                       |     1 | 13713 |    30   (4)| 00:00:01 |                                            
|   3 |    SORT ORDER BY STOPKEY         |                       |     1 |   715 |    30   (4)| 00:00:01 |                                            
|   4 |     FILTER                       |                       |       |       |            |          |                                            
|   5 |      NESTED LOOPS                |                       |    11 |  7865 |    29   (0)| 00:00:01 |                                            
|   6 |       TABLE ACCESS BY INDEX ROWID| VEGA_WCM_CONTENT_MAIN |    11 |  4631 |     7   (0)| 00:00:01 |                                            
|   7 |        INDEX RANGE SCAN          | CONTENT_PATH_CODE     |    12 |       |     3   (0)| 00:00:01 |                                            
|   8 |       TABLE ACCESS BY INDEX ROWID| VEGA_WCM_CONTENT_BLOB |     1 |   294 |     2   (0)| 00:00:01 |                                            
|   9 |        INDEX UNIQUE SCAN         | SYS_C007292           |     1 |       |     1   (0)| 00:00:01 |                                            
|  10 |      TABLE ACCESS BY INDEX ROWID | VEGA_WCM_VIEW_POLICY  |     1 |    89 |     4   (0)| 00:00:01 |                                            
|  11 |       INDEX RANGE SCAN           | POLICY_CONTENT_ID     |     1 |       |     3   (0)| 00:00:01 |                                            
----------------------------------------------------------------------------------------------------------                                            
                                                                                                                                                      
Query Block Name / Object Alias (identified by operation id):                                                                                         
-------------------------------------------------------------                                                                                         
                                                                                                                                                      
   1 - SEL$1                                                                                                                                          
   2 - SEL$2 / from$_subquery$_001@SEL$1                                                                                                              
   3 - SEL$2                                                                                                                                          
   6 - SEL$2 / CONTENT0_@SEL$2                                                                                                                        
   7 - SEL$2 / CONTENT0_@SEL$2                                                                                                                        
   8 - SEL$2 / CONTENTBLO1_@SEL$2                                                                                                                     
   9 - SEL$2 / CONTENTBLO1_@SEL$2                                                                                                                     
  10 - SEL$3 / VIEWPOLICY2_@SEL$3                                                                                                                     
  11 - SEL$3 / VIEWPOLICY2_@SEL$3                                                                                                                     
                                                                                                                                                      
Outline Data                                                                                                                                          
-------------                                                                                                                                         
                                                                                                                                                      
  /*+                                                                                                                                                 
      BEGIN_OUTLINE_DATA                                                                                                                              
      IGNORE_OPTIM_EMBEDDED_HINTS                                                                                                                     
      OPTIMIZER_FEATURES_ENABLE('11.2.0.2')                                                                                                           
      DB_VERSION('11.2.0.2')                                                                                                                          
      ALL_ROWS                                                                                                                                        
      OUTLINE_LEAF(@"SEL$3")                                                                                                                          
      OUTLINE_LEAF(@"SEL$2")                                                                                                                          
      OUTLINE_LEAF(@"SEL$1")                                                                                                                          
      NO_ACCESS(@"SEL$1" "from$_subquery$_001"@"SEL$1")                                                                                               
      INDEX_RS_ASC(@"SEL$2" "CONTENT0_"@"SEL$2" ("VEGA_WCM_CONTENT_MAIN"."CONTENT_PATH_CODE"))                                                        
      INDEX_RS_ASC(@"SEL$2" "CONTENTBLO1_"@"SEL$2" ("VEGA_WCM_CONTENT_BLOB"."BLOB_ID"))                                                               
      LEADING(@"SEL$2" "CONTENT0_"@"SEL$2" "CONTENTBLO1_"@"SEL$2")                                                                                    
      USE_NL(@"SEL$2" "CONTENTBLO1_"@"SEL$2")                                                                                                         
      INDEX_RS_ASC(@"SEL$3" "VIEWPOLICY2_"@"SEL$3" ("VEGA_WCM_VIEW_POLICY"."CONTENT_ID"))                                                             
      END_OUTLINE_DATA                                                                                                                                
  */                                                                                                                                                  
                                                                                                                                                      
Peeked Binds (identified by position):                                                                                                                
--------------------------------------                                                                                                                
                                                                                                                                                      
   1 - :1 (NUMBER): 3                                                                                                                                 
   2 - :2 (VARCHAR2(30), CSID=873): '/zong/zh/wpt6xglw/o7npo2m5/be51d66w'                                                                             
   3 - :3 (NUMBER): 5                                                                                                                                 
                                                                                                                                                      
Note                                                                                                                                                  
-----                                                                                                                                                 
   - cardinality feedback used for this statement                                                                                                     
                                                                                                                                                      
SQL_ID c9j9xmsyk285f                                                                                                                                  
--------------------                                                                                                                                  
                                                                             
 
PLAN_TABLE_OUTPUT                                                                                                                                     
------------------------------------------------------------------------------------------------------------------------------------------------------
(content0_.CREATER='guest' or exists (select viewpolicy2_.POLICY_ID                                                                                   
from VEGA_WCM_VIEW_POLICY viewpolicy2_ where                                                                                                          
content0_.CONTENT_ID=viewpolicy2_.CONTENT_ID and                                                                                                      
(viewpolicy2_.POLICY_TYPE||viewpolicy2_.POLICY_NAME in                                                                                                
('com.coolwen.core.security.impl.UserPrincipalImplguest' ,                                                                                            
'com.coolwen.core.security.impl.UserPrincipalImplguest')))) order by                                                                                  
content0_.CONTENT_ORDER DESC, content0_.ORDER_DATE DESC,                                                                                              
content0_.ORDER_NUMBER DESC ) where rownum <= :3                                                                                                      
                                                                                                                                                      
Plan hash value: 4092041270                                                                                                                           
                                                                                                                                                      
-----------------------------------------------------------------------------------------------------------------                                     
| Id  | Operation                       | Name                  | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |                                     
-----------------------------------------------------------------------------------------------------------------                                     
|   0 | SELECT STATEMENT                |                       |       |       |       | 13605 (100)|          |                                     
|   1 |  COUNT STOPKEY                  |                       |       |       |       |            |          |                                     
|   2 |   VIEW                          |                       |  1028 |    13M|       | 13605   (1)| 00:02:44 |                                     
|   3 |    SORT ORDER BY STOPKEY        |                       |  1028 |   717K|    12M| 13605   (1)| 00:02:44 |                                     
|   4 |     FILTER                      |                       |       |       |       |            |          |                                     
|   5 |      HASH JOIN                  |                       | 17880 |    12M|  7568K| 10908   (1)| 00:02:11 |                                     
|   6 |       TABLE ACCESS FULL         | VEGA_WCM_CONTENT_MAIN | 17880 |  7351K|       |  1681   (1)| 00:00:21 |                                     
|   7 |       TABLE ACCESS FULL         | VEGA_WCM_CONTENT_BLOB |   101K|    28M|       |  7383   (1)| 00:01:29 |                                     
|   8 |      TABLE ACCESS BY INDEX ROWID| VEGA_WCM_VIEW_POLICY  |     1 |    89 |       |     4   (0)| 00:00:01 |                                     
|   9 |       INDEX RANGE SCAN          | POLICY_CONTENT_ID     |     1 |       |       |     3   (0)| 00:00:01 |                                     
-----------------------------------------------------------------------------------------------------------------                                     
                                                                                                                                                      
Query Block Name / Object Alias (identified by operation id):                                                                                         
-------------------------------------------------------------                                                                                         
                                                                                                                                                      
   1 - SEL$1                                                                                                                                          
   2 - SEL$2 / from$_subquery$_001@SEL$1                                                                                                              
   3 - SEL$2                                                                                                                                          
   6 - SEL$2 / CONTENT0_@SEL$2                                                                                                                        
   7 - SEL$2 / CONTENTBLO1_@SEL$2                                                                                                                     
   8 - SEL$3 / VIEWPOLICY2_@SEL$3                                                                                                                     
   9 - SEL$3 / VIEWPOLICY2_@SEL$3                                                                                                                     
                                                                                                                                                      
Outline Data                                                                                                                                          
-------------                                                                                                                                         
                                                                                                                                                      
  /*+                                                                                                                                                 
      BEGIN_OUTLINE_DATA                                                                                                                              
      IGNORE_OPTIM_EMBEDDED_HINTS                                                                                                                     
      OPTIMIZER_FEATURES_ENABLE('11.2.0.2')                                                                                                           
      DB_VERSION('11.2.0.2')                                                                                                                          
      ALL_ROWS                                                                                                                                        
      OUTLINE_LEAF(@"SEL$3")                                                                                                                          
      OUTLINE_LEAF(@"SEL$2")                                                                                                                          
      OUTLINE_LEAF(@"SEL$1")                                                                                                                          
      NO_ACCESS(@"SEL$1" "from$_subquery$_001"@"SEL$1")                                                                                               
      FULL(@"SEL$2" "CONTENT0_"@"SEL$2")                                                                                                              
      FULL(@"SEL$2" "CONTENTBLO1_"@"SEL$2")                                                                                                           
      LEADING(@"SEL$2" "CONTENT0_"@"SEL$2" "CONTENTBLO1_"@"SEL$2")                                                                                    
      USE_HASH(@"SEL$2" "CONTENTBLO1_"@"SEL$2")                                                                                                       
      INDEX_RS_ASC(@"SEL$3" "VIEWPOLICY2_"@"SEL$3" ("VEGA_WCM_VIEW_POLICY"."CONTENT_ID"))                                                             
      END_OUTLINE_DATA                                                                                                                                
  */                                                                                                                                                  
                                                                                                                                                      
Peeked Binds (identified by position):                                                                                                                
--------------------------------------                                                                                                                
                                                                                                                                                      
   1 - :1 (NUMBER): 3                                                                                                                                 
   2 - :2 (VARCHAR2(30), CSID=873): '/guizhoufgs/zh/4ezxm9j6/ktt03p29/pbqtb4tt/zw0ixoxa'                                                              
   3 - :3 (NUMBER): 1                                                                                                                                 
                                                                                                                                                      
Note                                                                                                                                                  
-----                                                                                                                                                 
   - cardinality feedback used for this statement                                                                                                     
                                                                                                                                                      
 
216 rows selected.
 
SQL> spool off

cardinality feedback used for this statement , cardinality feedback技术反馈是 11g优化器新特性

action plan:

alter SYSTEM set "_optimizer_use_feedback" = false ; --关闭cardinality feedback
alter SYSTEM set "_optim_peek_user_binds"=false; --关闭BIND PEEK

尝试设置以上参数 并使用楼上的脚本 定期检查该SQL的执行计划

转载: https://forums.oracle.com/forums/thread.jspa?threadID=2455948&tstart=30
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值