Application Development and Automation 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: 
Read only

Seconday Index on Database Table

Former Member
0 Likes
819

Hi All,

I have writen a SELECT Query in which I have used my seconday Index fields in WHERE condition.

But I wanted to know whether my query using my secondary index or any other index.

Is there any way to find out which index has been used.

Could you please help me on this.

Hi All,

I have writen a SELECT Query in which I have used my seconday Index fields in WHERE condition.

But I wanted to know whether my query using my secondary index or any other index.

Is there any way to find out which index has been used.

Could you please help me on this.

4 REPLIES 4
Read only

schneidertho
Product and Topic Expert
Product and Topic Expert
0 Likes
794

Hi Chaitanya,

you should see this in the SQL trace (transaction ST05) in the explain statement for your SELECT

--> start the trace, run your program, end the trace, display it and explain the statement

Best regards

Thorsten

Read only

Former Member
0 Likes
794

Hi Chaitanya,

You can check this through ST05 or ST01.

What you need to be do is you need to activate the trace and run the valid statement and find out the run time. after that you need to activate the secondary index and again run the statement you will find out the difference in run time.

Hope this helps.

Read only

0 Likes
794

Hi,

Thank You for your inputs.

I have a DB Table which is having 9 secondary indexes.

But for 2 of them Inclusion/Exclusion is "E" when i click on Indexes for that DB Table.

So what does that indicate...Shall I use one of those 2 indexes in my WHERE condition....

Could you please help me on this.

Read only

0 Likes
794

Hi,

If the index is not unique we have two possible entries, 1.Exclusion and 2.Inclusion,

Inclusions Index: The index is only created automatically during activation for the database systems specified in the list. The index is not created on the database for the other database systems.

Exclusions Index: The index is not created automatically on the database during activation for the specified database systems. The index is automatically created on the database for the other database systems.

Hope this helps