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: 

Secondary index creation on the table

Former Member
0 Kudos

Hi Experts,

The select statement mentioned below taking very huge time in production.I checked for the indexes but thereis no index created with these fields and primary key's also not used in select statement.How can I create the secondary index and plese tell me the order of fields should be given in secondary index.

select * from dfkkop into corresponding fields of table t_dfkkop

where vtref like 'EPC%' and

( ( augbd = '00000000' and

xragl = 'X' )

or

( augbd ge w_clrfr and

augbd le w_clrto ) ) and

augrd ne '03' and

zwage_type in s_wtype.

Thanks&Regards,

Sam.

5 REPLIES 5

Former Member
0 Kudos

get in to the table

u can find a option to create indexes in the right hand side.

click ..........a pop up comes

and create new

to which field u want......

Regards

Anbu B

0 Kudos

Hi ,

Can you please tell me the order of fields to be mentioned in secondary index.

Regards,

sam.

0 Kudos

if the field is already having index then no need any order.

u can proceed with the mandt as the first field and with the new fields

for Exp

F1-mandt already having index

F2-numbre already having index

F3-name want to create

do like this

F1-mandt already having index

F3-name create like this

Regards

Anbu b

Former Member
0 Kudos

It is not advisable to create secondary index for every problem, Try to modify the existing select query.

You can solve this problem by reducing the where condition and hence using the binary search.

Regards,

GauthamV
Active Contributor
0 Kudos

hi,

u can get step by step process of creating secondary index in this site.

sap-technical.com - tutorials.