2006 Feb 22 4:04 PM
^Hello ,
I created Secondary index for a table, how do i know it is being used for my slect or not.
I have given in where condition the fields defined in index.
In ST05, i dont know i can see, when i go to DDIC explain it shows all the indexs on the table.
Where can i see which index si being used?
Rgds,
Ö
2006 Feb 22 4:10 PM
Hi,
In ST05, put your cursor on the Table name & click on the 'Explain' Pushbutton & then click on 'Access path'.. this should tell you which INDEX was used..
Regards,
Suresh Datti
2006 Feb 22 4:10 PM
You can see this in the "Explain" area of ST05. Put your cursor on the records for your table where the OP column is "OPEN". Click the "Explain" button. Now you will see the explaination of the SELECT statement. Further down the page, you will see under MAIN LEVEL 1, a tree structure, in there you will see the index which was used.
You should see something like this....
MAIN LEVEL 1
5 SUBSELECT LEVEL 1
5 File AFKO
5 <b>Index R3TSTDATA/AFKO+Z01 </b>
Reason code:
5 Key fields of the access path used:
MANDT
GLTRP
GETRI
Regards,
Rich Heilman
2006 Feb 22 4:10 PM
Hi ,
if you want to use specific index , include that index name in select like below statement. then select will work based on the specified index .
%_HINTS ORACLE 'index(index "0")'.
Laxman
2006 Feb 22 4:10 PM
Hi,
In ST05, put your cursor on the Table name & click on the 'Explain' Pushbutton & then click on 'Access path'.. this should tell you which INDEX was used..
Regards,
Suresh Datti