2014 Dec 11 3:59 AM
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.
2014 Dec 12 9:01 AM
2014 Dec 12 11:09 AM
Hi Joshi
The Report from ST12 trace.. SQL performance
2014 Dec 12 11:21 AM
hii Balaji
i want what you written in your select query in se 38..
Regards
Gaurav
2014 Dec 13 1:18 PM
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.
2014 Dec 13 1:31 PM
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
2014 Dec 15 5:01 AM
r u selection this from mkpf?
please check it again
Gaurav
2014 Dec 18 6:27 AM
Hi Balaji,
You are passing only date in your where condition. Try passing more fields in the key fields of MKPF and MSEG.
2014 Dec 18 8:30 AM
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