Joined: 31 Jan 2008 Posts: 38 Location: Chennai, India
I have to read one table having more than 10000 rows and insert into 4 diffrent tables.
Here, for each and every insert I am commiting the database but it is not optimized.
How to use savepoint to get rid of this or else is there any other way?
Joined: 23 Nov 2006 Posts: 8733 Location: 221 B Baker St
Hello,
Quote:
for each and every insert I am commiting the database but it is not optimized.
Typically, SELECTs are optimized when possible. INSERTs are always expensive.
Quote:
How to use savepoint to get rid of this or else is there any other way
What exactly do you want to "get rid of"? What does the term "savepoint" mean to you? It is not a database term. . .
On alternative would be to create 4 qsam files and load them externally rather than within the code. For most situations, 10thousand is not very many rows - how often does this process run?