About me:Oracle ACE pro,optimistic,passionate and harmonious. Focus on ORACLE,MySQL and other database programming,peformance tuning,db design, j2ee,Linux/AIX,Architecture tech,etc
全部博文(172)
分类: Oracle
2023-05-04 09:02:24
declare
v_hints sys.sqlprof_attr; v_sql_id clob; begin v_hints := sys.sqlprof_attr ( q'[BEGIN_OUTLINE_DATA]', q'[USE_NL(@"SEL$3" "F"@"SEL$3")]', q'[USE_NL(@"SEL$3" "H"@"SEL$3")]', q'[USE_NL(@"SEL$3" "E"@"SEL$3")]', q'[USE_NL(@"SEL$3" "A"@"SEL$3")]', q'[USE_NL(@"SEL$3" "B"@"SEL$3")]', q'[LEADING(@"SEL$3" "G"@"SEL$3" "B"@"SEL$3" "A"@"SEL$3" "E"@"SEL$3" "H"@"SEL$3" "F"@"SEL$3")]', 。。。 q'[IGNORE_OPTIM_EMBEDDED_HINTS]', q'[END_OUTLINE_DATA]' ); select sql_text into v_sql_id from gv$sql where sql_id='&sql_id' and rownum=1; dbms_sqltune.import_sql_profile(v_sql_id,v_hints,'profile_&sql_id',force_match => TRUE); end; / |