Skip to Content
0
Former Member
May 25, 2005 at 03:39 PM

Performance on select join vbap/vbak/vbep

762 Views

Hello,

I would like to know how improve the performance (time-reponse) of my select :

SELECT

apmatkl approdh apmatnr aparktx apvbeln apposnr apnetwr apkzwi3 apkzwi1 apmwsbp

epbmeng epwmeng epedatu apvrkme ap~brgew

INTO CORRESPONDING FIELDS OF TABLE p_tvbapcache

FROM vbap AS ap

INNER JOIN vbep AS ep ON apvbeln = epvbeln AND apposnr = epposnr

INNER JOIN vbak AS ak ON akvbeln = epvbeln AND apvbeln = akvbeln

WHERE ak~vbeln NOT LIKE '0005%'

AND ep~vbeln NOT LIKE '0005%'

AND ap~vbeln NOT LIKE '0005%'

AND ep~edatu IN date

AND ap~prodh IN nomencla

AND ak~auart IN canal

AND ap~matnr IN numero

AND apnetwr <> 0 AND apnetwr <> '0'

AND epwmeng <> 0 AND epwmeng <> '0'

AND epbmeng <> 0 AND epbmeng <> '0'

AND apkzwi1 <> 0 AND apkzwi1 <> '0'

AND ak~faksk <> 'Z3'.

The performance are very very very poor...

For information, there are 18.329.040 entries in VBAP table; VBAK : 485.437 entries ; VBEP : 18.304.173 entries

Many thanks for yours ideas,