‎2009 Feb 09 10:58 AM
There is an UPDATE statement that is very high in cost. I wanted to know whether there is any possibility of tuning the statement..by using any general methods like where statements,Indexes etc..?
‎2009 Feb 10 4:55 AM
Hi ,
If you are updating from wark_area ( i.e Update ... from wa ) then it is allways better specify all key fields value in the wark_area.
If you are updating from internal table ( Update ... Table itab ) then it is allways better specify all records of the table in sorted manner.
If in your Update statement having where clause then Try to specify all the key fields left-justifiedly with out any gaps and if it is not possible then provide fields in where clause with-out missing any field .
If you are often using one or more than one same fields ( other than key fields ) , you can create a secondary index with those fields.
Regards
Pinaki
Edited by: Pinaki Mukherjee on Feb 10, 2009 5:56 AM
‎2009 Feb 09 11:34 AM
there are different UPDATE statements!
UPDATE .... FROM WA
UPDATE .... FROM itab
UPDATE ... WHERE ...
The last one has the same problems as any SELECT, either is a suitable index or not.
The first two should use the primary key, however, the arrayupdate FROM itab is of course better.
Siegfried
‎2009 Feb 09 12:31 PM
Hi,
User array operation to UPDATE.
Move all the data the needs to be update to One internal Table.
After that user :
Update from Itab.
Beacuse there will be only One data base hit instead of many.
That will decrease load on DB Server.
Hope this will resolve the issue.
Regards,
Gurpreet
‎2009 Feb 10 4:55 AM
Hi ,
If you are updating from wark_area ( i.e Update ... from wa ) then it is allways better specify all key fields value in the wark_area.
If you are updating from internal table ( Update ... Table itab ) then it is allways better specify all records of the table in sorted manner.
If in your Update statement having where clause then Try to specify all the key fields left-justifiedly with out any gaps and if it is not possible then provide fields in where clause with-out missing any field .
If you are often using one or more than one same fields ( other than key fields ) , you can create a secondary index with those fields.
Regards
Pinaki
Edited by: Pinaki Mukherjee on Feb 10, 2009 5:56 AM
‎2009 Feb 10 8:11 AM
hi,
Avoid updating a complete row, use UPDATE+SET statement to update a single field
https://www.sdn.sap.com/irj/scn/wiki?path=/display/abap/performance
Please check this link
http://help.sap.com/saphelp_nw04s/helpdata/en/6e/b4fe76e7d311d5995b00508b5d5211/frameset.htm
thanks
‎2009 Feb 10 9:53 AM
> then it is allways better specify all records of the table in sorted manner.
really, I doubt that it will have any effect.