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

Performance issue.

Former Member
0 Likes
575

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

1 ACCEPTED SOLUTION
Read only

Former Member
0 Likes
545

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...

5 REPLIES 5
Read only

Former Member
0 Likes
546

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...

Read only

Former Member
0 Likes
545

remove into corresponding fields addition...and try to give the field names in select statement in order of database table.

Reward if useful.

Dara.

Read only

Former Member
0 Likes
545

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.

Read only

Former Member
0 Likes
545

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.

Read only

former_member251078
Participant
0 Likes
545

Hello,

Please create histograms for tables MKPF and MSEG tables as mentioned in SAP Notes 902675 and 921164.

Hope this helps

Regards

Dileep