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: 

How to know whether Secondary Indexes used or not

former_member565266
Participant

Hello Experts,

I have some list of Secondary Indexes, I want to know that what programs are being used those indexes.

1 ACCEPTED SOLUTION

ThomasZloch
Active Contributor

Speak to your DB admin. Depending on DBMS there might be tools in DB02 / DBACOCKPIT that allow such an analysis (but only since last DB start).

A self-confident approach could be (after a where-used list analysis as stated):

1) deactivate index

2) wait for complaints, if any, activate again

9 REPLIES 9

kiran_k8
Active Contributor

Satish,

1. List out the tables related to those secondary Indexes.

2. Do a WHERE USED LIST of those tables.

3. List out those Programs and activate the TRACE ( ST12 or ST05 ) on whichever the Program is required.

4. That way you can have an idea on which INDEXes are being used by which programs.

May be, experts here can provide you a better approach with a more refined method.

K.Kiran.

matt
Active Contributor
0 Kudos

Nope. That's about it. There's no static check for index usage.

0 Kudos

Thank you so much for your replies.
is there any standard program availible for this.?

Thanks,

Satish

matt
Active Contributor
0 Kudos

A standard program for what?

pokrakam
Active Contributor
0 Kudos

There is no static check on index usage. This is because SAP doesn't determine what index to use, the database decides at runtime what indexes to use each time the table is accessed.

But, you can get a reasonable approximation: do a where used on the table and look at all the SELECT statements involved. If the WHERE clause matches your index fields, then chances are good that the index will be used.

But as Kiran already indicated, the only real way to tell is a trace. But even with the same ABAP SQL statements different queries may produce different behaviour at the DB level.

ThomasZloch
Active Contributor

Speak to your DB admin. Depending on DBMS there might be tools in DB02 / DBACOCKPIT that allow such an analysis (but only since last DB start).

A self-confident approach could be (after a where-used list analysis as stated):

1) deactivate index

2) wait for complaints, if any, activate again

0 Kudos

🙂 🙂 To which part of the World do you belong,Thomas.

K.Kiran.

srikanthnalluri
Active Participant
0 Kudos

Along with other options provided here, you can check the program - RS_ABAP_SOURCE_SCAN (Scans the string based on the selection.)

S.N,

I think you are referring to a program which can shortlist the programs where INDEX is forced by the developer.

But OP is requesting info at the Compiler level.

K.Kiran.