01-30-2009 9:15 AM
This is my loop:
LOOP AT appoggio INTO appoggio1.
READ TABLE tb_dfkkzw WITH KEY opbel = appoggio1-opbel INTO tb_dfkkzw BINARY SEARCH.
IF sy-subrc = 0.
DELETE appoggio WHERE opbel = appoggio1-opbel.
ENDIF.
ENDLOOP.
In appoggio there are 650.000 record and for do this loop my job during 80.000 seconds how i can improving performance?
thanks
sorry for my english
01-30-2009 9:37 AM
There is serious bug => quadratic coding!!!
+ The DELETE searchs linearly and does not use the BINARY SEARCH!
+ add a TRANSPORTING NO FIELDS
LOOP AT appoggio INTO appoggio1.
idx1 = sy-tabix.
READ TABLE tb_dfkkzw TRANSPORTING NO FIELDS
WITH KEY opbel = appoggio1-opbel BINARY SEARCH.
IF sy-subrc = 0.
DELETE appoggio index idx1.
ENDIF.
ENDLOOP.
Siegfried
01-30-2009 9:37 AM
There is serious bug => quadratic coding!!!
+ The DELETE searchs linearly and does not use the BINARY SEARCH!
+ add a TRANSPORTING NO FIELDS
LOOP AT appoggio INTO appoggio1.
idx1 = sy-tabix.
READ TABLE tb_dfkkzw TRANSPORTING NO FIELDS
WITH KEY opbel = appoggio1-opbel BINARY SEARCH.
IF sy-subrc = 0.
DELETE appoggio index idx1.
ENDIF.
ENDLOOP.
Siegfried