Skip to Content
0

How Could i improve the Performance

Apr 10 at 09:46 AM

84

avatar image

Hi,
Need small information.
below Queries running more than 30 secons. ,Actually this is not a much of time , but i am not using below queries at report, I am using at MIGO Before posting. I have some validation at MIGO, Goods Receipt posting Against to the Production order. I try to arrange the fields sequence like table(mseg) fields . But there is no improve in the performance.Any other way to improve the performance.

SELECT mblnr zeile aufnr dmbtr menge meins matnr FROM mseg INTO CORRESPONDING FIELDS OF TABLE it_wdwd WHERE aufnr EQ imp_aufnr AND bwart EQ '261'.

SELECT mblnr zeile menge INTO TABLE it_mseg FROM mseg WHERE aufnr EQ imp_aufnr AND bwart EQ '101'.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Mustafa Eroztekin Apr 10 at 08:45 PM
0

Hi,

table AUFM could be usefull for your case.

BR

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Thank you, I did not know the table about AUFM. Some what helped it.

0
Hubert Heitzer Apr 10 at 10:38 AM
1

Hi,

1a. Using fields of an existing index of MSEG in your conditions - if possible - will increase your SELECTs significant

1b. If not possible, creating an index for table MSEG with the fields AUFNR and BWART will increase your SELECTs significant

2. Avoiding use of "INTO CORRESPONDING FIELDS OF TABLE" may increase your SELECTs a little bit.

Regards, Hubert

Show 5 Share
10 |10000 characters needed characters left characters exceeded

I will check it.

0

Hi Kali,

Regarding Hubert Heitzer steps 1a and 1b below example about DataBase Hints to consider analysing performance with MSEG secondary index fields (MANDT, AUFNR and BWART).

%_HINTS ORACLE 'INDEX(MSEG "secondary index described above...")'

SAP transaction ST05 to trace and analyse SQL performance.

Regards,

1

INTO CORRESPONDING FIELDS causing performance issues is a myth.

https://blogs.sap.com/2012/12/10/why-into-corresponding-is-much-better-than-its-reputation/

3
Matthew Billingham

I just wanted to show performance optimization potential.
I don't think INTO CORRESPONDING FIELDS is for free, is it?
The example in the blog does not show any measurably advantage in performance, but what about when INTO CORRESPONDING FIELDS is used in loops or recursions?
Nevertheless I am also sure, that INTO CORRESPONDING FIELDS is insignificant compared to DB access.

1

Well, you shouldn't be using SELECTs in a loop or in recursion anyway! But even then, a modern optimiser is likely to be able to do the effort required once, so the overhead would be a few milliseconds - no matter how many times it the command runs. Moving data around memory has been a super-fast operation for most chips and OSes for very many years.

1