09-10-2008 6:29 AM
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.
09-10-2008 6:33 AM
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
09-10-2008 7:32 AM
Hi ,
Can you please tell me the order of fields to be mentioned in secondary index.
Regards,
sam.
09-10-2008 7:36 AM
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
09-10-2008 6:33 AM
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,
09-10-2008 6:33 AM
hi,
u can get step by step process of creating secondary index in this site.
sap-technical.com - tutorials.