Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

Index

Former Member
0 Kudos

^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,

Ö

1 ACCEPTED SOLUTION

suresh_datti
Active Contributor
0 Kudos

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

3 REPLIES 3

RichHeilman
Developer Advocate
Developer Advocate
0 Kudos

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

laxmanakumar_appana
Active Contributor
0 Kudos

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

suresh_datti
Active Contributor
0 Kudos

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