sql profiler

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

sql profiler

Roshan
Hello Erman,

can you please advise how to force sql profiler to use index?

DECLARE
  l_sql_text   CLOB;
  l_sql_patch  VARCHAR2(30) := 'PATCH_AA_ARR_CUST_PK';
BEGIN
  SELECT sql_fulltext
  INTO   l_sql_text
  FROM   v$sql
  WHERE  sql_id = '0yyb0jzbwn'
  AND    rownum = 1;

  DBMS_SQLDIAG_INTERNAL.I_CREATE_PATCH(
    sql_text    => l_sql_text,
    hint_text   => 'INDEX(@"SEL$1" "XAX" "AXA_PK")',
    name        => l_sql_patch,
    category    => 'DEFAULT',
    validate    => TRUE
  );
END;
/
Reply | Threaded
Open this post in threaded view
|

Re: sql profiler

ErmanArslansOracleBlog
Administrator
This post was updated on .
check the outline data using select * from table(dbms_xplan.display_awr....
or use SELECT * FROM table(DBMS_XPLAN.DISPLAY_CURSOR....

And check the correct INDEX... part..

Use the information gathered from there in the hint_text argument of  "DBMS_SQLDIAG_INTERNAL.I_CREATE_PATCH(..........."