about me:oracle ace,optimistic,passionate and harmonious. focus on oracle programming,peformance tuning,db design, j2ee,linux/aix,web2.0 tech,etc
全部博文(145)
分类: 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; / |