Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> A question about update and insert/delete
Hi,
We have a piece of JAVA code, which does heavy Insert or update.
We have found out that a single update with a single WHERE clause (the table is indexed according to the Column given in where clause), takes more time compared to a DELETE + INSERT statement.
Can someone please shed light on this? Therotically speaking, both the operations(INSERT & DELETE) should take roughly the same amount of time.
Let us say that INSERT+DELETE operation takes 10 seconds, than
update takes 20-30 seconds. We are using bulk updates, using
Statement.addBatch() statements.
The Database is Oracle 9i