‎2009 Aug 29 12:40 PM
Hi experts,
How to improve the performance of below query,
while i have create index on charg(batch number).
SELECT MATNR CHARG FROM mcha
APPENDING TABLE itab
WHERE charg IN s_charg .
‎2009 Aug 29 12:44 PM
what is the need of creating index on it? it already is a primary key
‎2009 Aug 29 1:06 PM
‎2009 Aug 29 1:09 PM
Hi,
Try to use all the possible primary key fields in the select where condition. The performance would increase considerably.
Regards,
Vikranth
‎2009 Aug 29 3:32 PM
Hi,
the index is used only if the index fields are supplied in the where condition, i.e. the index of MCHA has MATNR WERKS CHARG. If MATNR is not supplied, the index will never be used.
If you really have no other way (I think you can retrieve the material numbers by analyzing certain movement types of material movements in MKPF and MSEG), then you may create an index on MCHA-CHARG. But you should be aware that this may decrease the performance of many logistics modules.
Try to analyze the requirement in business terms.
Regards,
Clemens
‎2009 Sep 05 8:24 AM
‎2009 Sep 05 12:08 PM
Hi Tomar,
You can go for dynamic selection...with this u can possibly send atleast 2-3 or as many input values and pass it on to select stmt...performance can reduce a little bit....
Regards,
Vamshi
‎2009 Sep 05 12:40 PM
hi,
BWTAR is then index field in this table . try to this field in where condition
Jitendra