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

Table Index

Former Member
0 Likes
611

Has does a select know which index to use? Thanks.

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
582

Index is selected based on conditions in the select statement. A close match is done to choose the index.

Thanks,

- Cheers

4 REPLIES 4
Read only

Former Member
0 Likes
582

In DB2 and Oracle, I think it uses the database statistics.

The DBAs keep the statistics up to date by running transaction DB20 (or DB20ORA).

Rob

Message was edited by:

Rob Burbank

Read only

Former Member
0 Likes
583

Index is selected based on conditions in the select statement. A close match is done to choose the index.

Thanks,

- Cheers

Read only

former_member182371
Active Contributor
0 Likes
582

Hi,

please do have a look at the following link:

https://www.sdn.sap.com/irj/sdn/wiki?path=/display/profile/2007/09/19/indexinginSAP+Tables

Hope it helps.

Best regards.

Read only

Former Member
0 Likes
582

Hi Tom,

Index is selected based on the where clause of the select query.

SELECT * FROM MARA

where MATNR = '0000242342'.

Here Database would select from MARA based on MATNR. So if there is a index available on MATNR then that index would be used.

Best regards,

Prashant