Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: A question about update and insert/delete
"Amardeep Verma" <addverma_at_gmail.com> wrote in message
news:431a4ee7.0502040203.1294d80a_at_posting.google.com...
> 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
> _________________________________
> Regards,
> Amardeep Verma
Also are you using bind variables? (parameterized)
Jim
Received on Fri Feb 04 2005 - 08:43:45 CST