6.1.11

SAP Note 17242 - ME51 ME57 ME21, performance problems under INFORMIX

Symptom:

The Purchasing transactions take unusually long. For example, several
minutes are required for source determination.

Cause and prerequisites

Select statements are not suitable for the Informix Optimizer.

Solution
Make the following changes in the program LMEQRF03 in the routines 'VERTRAEGE' and 'VERTRAEGE_OHNE_MATERIAL':

*eject
*----------------------------------------------------------------------*
* Suchen Rahmenverträge
*----------------------------------------------------------------------*
FORM VERTRAEGE.

...
...
IF COMIM-MATNR NE SPACE.
IF COMIM-WERKS NE SPACE.
* SELECT * FROM EKPO WHERE ( MATNR EQ COMIM-MATNR AND "<-- old
* WERKS EQ COMIM-WERKS AND "<-- old
* BSTYP EQ BSTYP-LFPL AND "<-- old
* LOEKZ EQ SPACE AND "<-- old
* ELIKZ EQ SPACE ) OR "<-- old
* ( MATNR EQ COMIM-MATNR AND "<-- old
* WERKS EQ COMIM-WERKS AND "<-- old
* BSTYP EQ BSTYP-KONT AND "<-- old
* LOEKZ EQ SPACE AND "<-- old
* ELIKZ EQ SPACE ) OR "<-- old
* ( MATNR EQ COMIM-MATNR AND "<-- old
* WERKS EQ SPACE AND "<-- old
* BSTYP EQ BSTYP-KONT AND "<-- old
* LOEKZ EQ SPACE AND "<-- old
* ELIKZ EQ SPACE ). "<-- old

SELECT * FROM EKPO CLIENT SPECIFIED "<- new
WHERE ( MANDT EQ SY-MANDT AND "Liefe"<- new
MATNR EQ COMIM-MATNR AND "<- new
WERKS EQ COMIM-WERKS AND "<- new
BSTYP EQ BSTYP-LFPL AND "<- new
LOEKZ EQ SPACE AND "<- new
ELIKZ EQ SPACE ) OR "<- new
( MANDT EQ SY-MANDT AND "Kontr"<- new
MATNR EQ COMIM-MATNR AND "<- new
WERKS EQ COMIM-WERKS AND "<- new
BSTYP EQ BSTYP-KONT AND "<- new
LOEKZ EQ SPACE AND "<- new
ELIKZ EQ SPACE ) OR "<- new
( MANDT EQ SY-MANDT AND "Zentr"<- new
MATNR EQ COMIM-MATNR AND "<- new
WERKS EQ SPACE AND "<- new
BSTYP EQ BSTYP-KONT AND "<- new
LOEKZ EQ SPACE AND "<- new
ELIKZ EQ SPACE ). "<- new


...
...
IF COMIM-MATKL NE SPACE AND COMIM-MATNR EQ SPACE.
IF COMIM-WERKS NE SPACE.
SELECT * FROM EKPO "<-- old
WHERE ( MATNR EQ SPACE AND "<-- old
MATKL EQ COMIM-MATKL AND "<-- old
WERKS EQ COMIM-WERKS AND "<-- old
BSTYP EQ BSTYP-LFPL AND "<-- old
LOEKZ EQ SPACE AND "<-- old
ELIKZ EQ SPACE ) OR "<-- old
( MATNR EQ SPACE AND "<-- old
MATKL EQ COMIM-MATKL AND "<-- old
WERKS EQ COMIM-WERKS AND "<-- old
BSTYP EQ BSTYP-KONT AND "<-- old
LOEKZ EQ SPACE AND "<-- old
ELIKZ EQ SPACE ) OR "<-- old
( MATNR EQ SPACE AND "<-- old
MATKL EQ COMIM-MATKL AND "<-- old
WERKS EQ SPACE AND "<-- old
BSTYP EQ BSTYP-KONT AND "<-- old
LOEKZ EQ SPACE AND "<-- old
ELIKZ EQ SPACE ). "<-- old
SELECT * FROM EKPO CLIENT SPECIFIED "<-- new
WHERE ( MANDT EQ SY-MANDT AND "Lieferpläne "<-- new
MATNR EQ SPACE AND "<-- new
MATKL EQ COMIM-MATKL AND "<-- new
WERKS EQ COMIM-WERKS AND "<-- new
BSTYP EQ BSTYP-LFPL AND "<-- new
LOEKZ EQ SPACE AND "<-- new
ELIKZ EQ SPACE ) OR "<-- new
( MANDT EQ SY-MANDT AND "Werkskontrak"<-- new
MATNR EQ SPACE AND "<-- new
MATKL EQ COMIM-MATKL AND "<-- new
WERKS EQ COMIM-WERKS AND "<-- new
BSTYP EQ BSTYP-KONT AND "<-- new
LOEKZ EQ SPACE AND "<-- new
ELIKZ EQ SPACE ) OR "<-- new
( MANDT EQ SY-MANDT AND "Zentralkontra"<-- new
MATNR EQ SPACE AND "<-- new
MATKL EQ COMIM-MATKL AND "<-- new
WERKS EQ SPACE AND "<-- new
BSTYP EQ BSTYP-KONT AND "<-- new
LOEKZ EQ SPACE AND "<-- new
ELIKZ EQ SPACE ). "<-- new


*eject
*---------------------------------------------------------------------
* Suchen Rahmenverträge ohne Material für Material
*---------------------------------------------------------------------
FORM VERTRAEGE_OHNE_MATERIAL.

...
...
IF COMIM-MATKL NE SPACE AND
COMIM-MATNR NE SPACE.
IF COMIM-WERKS NE SPACE.
SELECT * FROM EKPO "<-- old
WHERE ( MATNR EQ SPACE AND "<-- old
MATKL EQ COMIM-MATKL AND "<-- old
WERKS EQ COMIM-WERKS AND "<-- old
BSTYP EQ BSTYP-LFPL AND "<-- old
LOEKZ EQ SPACE AND "<-- old
ELIKZ EQ SPACE ) OR "<-- old
( MATNR EQ SPACE AND "<-- old
MATKL EQ COMIM-MATKL AND "<-- old
WERKS EQ COMIM-WERKS AND "<-- old
BSTYP EQ BSTYP-KONT AND "<-- old
LOEKZ EQ SPACE AND "<-- old
ELIKZ EQ SPACE ) OR "<-- old
( MATNR EQ SPACE AND "<-- old
MATKL EQ COMIM-MATKL AND "<-- old
WERKS EQ SPACE AND "<-- old
BSTYP EQ BSTYP-KONT AND "<-- old
LOEKZ EQ SPACE AND "<-- old
ELIKZ EQ SPACE ). "<-- old
SELECT * FROM EKPO CLIENT SPECIFIED "<-- new
WHERE ( MANDT EQ SY-MANDT AND "Liefer "<-- new
MATNR EQ SPACE AND "<-- new
MATKL EQ COMIM-MATKL AND "<-- new
WERKS EQ COMIM-WERKS AND "<-- new
BSTYP EQ BSTYP-LFPL AND "<-- new
LOEKZ EQ SPACE AND "<-- new
ELIKZ EQ SPACE ) OR "<-- new
( MANDT EQ SY-MANDT AND "Werks "<-- new
MATNR EQ SPACE AND "<-- new
MATKL EQ COMIM-MATKL AND "<-- new
WERKS EQ COMIM-WERKS AND "<-- new
BSTYP EQ BSTYP-KONT AND "<-- new
LOEKZ EQ SPACE AND "<-- new
ELIKZ EQ SPACE ) OR "<-- new
( MANDT EQ SY-MANDT AND "Zentra "<-- new
MATNR EQ SPACE AND "<-- new
MATKL EQ COMIM-MATKL AND "<-- new
WERKS EQ SPACE AND "<-- new
BSTYP EQ BSTYP-KONT AND "<-- new
LOEKZ EQ SPACE AND "<-- new
ELIKZ EQ SPACE ). "<-- new

No comments:

Post a Comment