‎2008 Apr 22 7:40 AM
Performance is very slow in standard transaction MB51,
Particularly in this query!
select (g_t_fields)
into corresponding fields of table itab
from mkpf inner join mseg
on mkpfmandt = msegmandt
and mkpfmblnr = msegmblnr
and mkpfmjahr = msegmjahr
WHERE MKPF~BUDAT in BUDAT
and MSEG~BWART in BWART
and MSEG~CHARG in CHARG
and MSEG~KUNNR in KUNNR
and MSEG~LGORT in LGORT
and MSEG~LIFNR in LIFNR
and MSEG~MATNR in MATNR
and MSEG~SOBKZ in SOBKZ
and MKPF~USNAM in USNAM
and MKPF~VGART in VGART
and MSEG~WERKS in WERKS
and MKPF~XBLNR in XBLNR
I referred a OSS note 357187 and according to that, i unchecked some fields in the view mentioned in that. But still performance is very slow. it is taking 20 mints to give output.
Please help me! Its very urgent
‎2008 Apr 22 10:20 AM
The problem is that the index is not used because more fields are selected...
A good solution can be found here, but for the transaction MB51, it would mean that you have to change standard SAP:
[http://www.sap-img.com/abap/select-statement-with-inner-join-is-taking-forever.htm|http://www.sap-img.com/abap/select-statement-with-inner-join-is-taking-forever.htm]
MB51 only run fast if you only use the fields in the indexes...
‎2008 Apr 22 10:20 AM
The problem is that the index is not used because more fields are selected...
A good solution can be found here, but for the transaction MB51, it would mean that you have to change standard SAP:
[http://www.sap-img.com/abap/select-statement-with-inner-join-is-taking-forever.htm|http://www.sap-img.com/abap/select-statement-with-inner-join-is-taking-forever.htm]
MB51 only run fast if you only use the fields in the indexes...
‎2008 Apr 22 10:22 AM
remove into corresponding fields addition...and try to give the field names in select statement in order of database table.
Reward if useful.
Dara.
‎2008 Apr 22 10:25 AM
Change the order of fields in where condition ..
select (g_t_fields)
into corresponding fields of table itab
from mkpf inner join mseg
on mkpfmandt = msegmandt
and mkpfmblnr = msegmblnr
and mkpfmjahr = msegmjahr
WHERE MKPF~BUDAT in BUDAT
and MKPF~USNAM in USNAM
and MKPF~VGART in VGART
and MKPF~XBLNR in XBLNR
and MSEG~BWART in BWART
and MSEG~CHARG in CHARG
and MSEG~KUNNR in KUNNR
and MSEG~LGORT in LGORT
and MSEG~LIFNR in LIFNR
and MSEG~MATNR in MATNR
and MSEG~SOBKZ in SOBKZ
and MSEG~WERKS in WERKS.
‎2008 Apr 22 10:27 AM
hi ,
it is always better not to use the into corresponding fiields and please use the all primary secondary indexes to improve performance..if you forgot a single key it will effect more in the performance..
regards,
venkat.
‎2008 Apr 23 1:19 PM
Hello,
Please create histograms for tables MKPF and MSEG tables as mentioned in SAP Notes 902675 and 921164.
Hope this helps
Regards
Dileep