Skip to Content

How Could i improve the Performance

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 10 at 08:45 PM

    Hi,

    table AUFM could be usefull for your case.

    BR

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 10 at 10:38 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

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