‎2007 Sep 10 7:54 AM
Does the below situation will effect performance..order in table is different from query??
in query order:
SELECT bukrs belnr gjahr monat blart bldat budat
cpudt usnam tcode bktxt awkey
INTO TABLE ibkpf FROM bkpf
WHERE bukrs IN bukrs
AND belnr IN belnr
AND gjahr IN gjahr
AND monat IN monat
AND blart IN blart
AND tcode IN tcode.
In the table order:
MANDT key
BUKRS key
BELNR key
GJAHR key
BLART
BLDAT
BUDAT
MONAT
CPUDT
CPUTM
AEDAT
UPDDT
WWERT
USNAM
TCODE
‎2007 Sep 10 8:00 AM
performance is affected by the filled fields in the where condition not by the order of the fields!
In your where condition there are all primary key fields, so everything could be fine. BUT the main question is which conditions are actually used in the execution, are all range for BUKRS, BELNR and GJAHR really filled?
Siegfried
‎2007 Sep 10 10:01 AM
Hi thx
Actually BUKRS and GJAHR are mandetory. belnr is not..
it's std prog..can u suggest me now?
‎2007 Sep 10 2:34 PM
‎2007 Sep 11 6:48 AM
‎2007 Sep 11 2:16 PM
‎2007 Sep 13 9:33 AM
Hi,
Remember one thing in performance- use all KEY fileds in WHERE whenever possible to get the fast access from tables.
In ur coding peformance wise gives bit issue why because there are only three fields are KEY filed in where condition are bukrs, belnr, gjahr but remaining fields are NON KEY fields.
But really you want to improve the perfomance you can create the SECONDARY INDEX for all the fileds used in where, i am not sure client are agree to create secondary index why bec one if you r going to create secondory index the table needs to memory of original table say table have 100 mb memory, once if create index it need again 100 mb which like create one more showd table.
<b>NOTE : select statement consider only one index if use multiple fields whcih are exit in multiple indexs.</b>
<b>Reward with points if helpful.</b>
Regards,
Vijay