Application Development 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: 

Poor performance with same kind of data and same query comparing

Former Member
0 Kudos

Dear Gurus

We have done system refresh PRD-->PR1  and PRD-->QAS  on same date with the same PRD data.

The below query consuming  30 minutes to run in PR1 system,

but the same is working fine in less than 6 minutes in QAS system

from ST12 the below query takes 30 mins  time in PR1, and  4-6 mins in QAS

SELECT  WHERE "MKPF"."MANDT"= '400'  AND "MKPF"."CPUDT">= 20141204      

db statistics are uptodate in both the system. even the system is less loaded, and still giving poor performance..

could you please shed some light on this.

8 REPLIES 8

Former Member
0 Kudos

Please paste your select query.

0 Kudos

Hi Joshi

The Report from ST12 trace.. SQL performance

0 Kudos

hii Balaji

i want what you written in your select query in se 38..

Regards

Gaurav

0 Kudos

Hi joshi:

SELECT mseg~mblnr

          mseg~mjahr

          mseg~zeile

          mseg~bwart

          mseg~kzbew 

          mseg~kzvbr 

          mseg~xauto

          mseg~matnr

          mseg~werks

          mseg~lgort

          mseg~insmk

          mseg~sobkz  

          mseg~lifnr

          mseg~shkzg

          mseg~menge

          mseg~meins

          mseg~bustm

          mseg~ebeln 

          mseg~ebelp  

          mseg~aufnr  

          mkpf~cpudt

          mkpf~cputm

     INTO TABLE gt_mseg

     FROM mkpf INNER JOIN mseg

       ON mkpf~mblnr = mseg~mblnr

      AND mkpf~mjahr = mseg~mjahr

    WHERE mkpf~cpudt GE gv_old_date

0 Kudos

or something like below:

SELECT "MSEG"."MBLNR","MSEG"."MJAHR","MSEG"."ZEILE","MSEG"."BWART","MSEG"."KZBEW","MSEG"."KZVBR","MSEG"."XAUTO","MSEG"."MATNR","MSEG"."WERKS","MSEG"."LGORT","MSEG"."INSMK","MSEG"."SOBKZ","MSEG"."LIFNR","MSEG"."SHKZG","MSEG"."MENGE","MSEG"."MEINS","MSEG"."BUSTM","MSEG"."EBELN","MSEG"."EBELP","MSEG"."AUFNR","MKPF"."CPUDT","MKPF"."CPUTM" FROM "MKPF" INNER JOIN "MSEG" ON "MKPF"."MANDT"="MSEG"."MANDT" AND "MKPF"."MBLNR"="MSEG"."MBLNR" AND "MKPF"."MJAHR"="MSEG"."MJAHR" WHERE "MKPF"."MANDT"=:A0 AND "MKPF"."CPUDT">=:A1

0 Kudos

r u selection this from mkpf?

please check it again

Gaurav

0 Kudos

Hi Balaji,

You are passing only date in your where condition. Try passing more fields in the key fields of MKPF and MSEG.

0 Kudos

Did you check the execution plan in SQL trace in both the system? Maybe the access plan is referring to different indexes which is causing the difference in the execution time.

Regards