‎2007 Dec 11 4:26 PM
Hello,
What is the most efficient do several INSERT
that is to say make an insert for each line or
using
INSERT <TABLE> FROM <INTERNAL_TABLE>
I have to load a specific table, i use the INSERT from INTERNAL TABLE
but the program is very very long.
When i start to update the table it is always empty.
Thanks for your help
Christophe
‎2007 Dec 11 4:37 PM
The array insert (from an internal table) will be the quickest way.
Rob
‎2007 Dec 11 4:37 PM
The array insert (from an internal table) will be the quickest way.
Rob
‎2007 Dec 11 4:51 PM
‎2007 Dec 11 4:59 PM
BETWEEN 100 000 and 300 000
i think in developpement there is no data and in integration there is less than a thousand of records.
But the program is still running for more than two hours ....
‎2007 Dec 11 5:03 PM
‎2007 Dec 11 5:09 PM
YES AND I SEE NO SQL EVENTS, no DUMP in ST22 as in SM21
Christophe
‎2007 Dec 11 5:12 PM
So the problem is likely elsewhere. If the program is not too long, would you post it?
Rob
‎2007 Dec 11 4:47 PM
1. loop at itab.
INSERT INTO dtable VALUES itab.
clear itab.
endloop.
or
2. INSERT dtab FROM itab[].
‎2007 Dec 11 4:53 PM
i load a table by using INSERT dtab FROM itab[].
and the response time is very long .....
I will try to INSERT line by line by i think that using an internal table seems to be the faster solution.
If anyone has a better solution, you're welcome.
My specific table has the same key than KONV and no duplicate are possible.
using a MODIFY can be a solution but i think that it will be slower than INSERT
....
‎2007 Dec 11 4:56 PM
No - that will take longer. Try sorting the internal table by the primary key before doing the array insert.
Again - how many records?
Rob
‎2007 Dec 11 5:00 PM
The internal table is sorted of course and it's structure is the same than target table.
‎2007 Dec 12 12:59 PM